**************************************************
**** Immigration and International Law
**** Synthetic Control Analysis
**** Replication .do file (3 of 3)
**** Margaret E. Peters 
**** July 2018

version 13.1
set more off
*** Merge files to set up dataset
use "leblang_flow_data.dta", clear
sort ccode1 ccode2 year
save "leblang_flow_data.dta", replace

merge m:m ccode1 year using "unemp1.dta"
drop _merge

merge m:m ccode2 year using "unemp2.dta"
drop _merge

merge m:m ccode1 year using "maddison_gdppc_1.dta"
drop _merge

merge m:m ccode2 year using "maddison_gdppc_2.dta"
drop _merge

merge m:m ccode1 year using "maddison_gdp_1.dta"
drop _merge

merge m:m ccode2 year using "maddison_gdp_2.dta"
drop _merge

drop if flow==.
sort ccode1 ccode2 year

gen lccode2=ccode2/1000
gen id=ccode1+lccode2

duplicates drop id year, force
tsset id year

save "data_for_synth.dta", replace

****Synthetic Analysis
* In general, each graph is created as follows:
* 1. I kept only the receiving country
* 2. Dropped all the other countries with a treaty in force at the same time (as they are treated as well)
* 3. Told STATA it is a panel dataset
* 4. Ran the synth program



*Canada-Italy 1971

use "data_for_synth", clear

keep if ccode1==20
drop if ccode2==70 
drop if ccode2== 31 |ccode2==56 ////
| ccode2==56 | ccode2==53 |ccode2==54 | ccode2==57 | ccode2==58 | ccode2==60 | ccode2==80 ////
| ccode2==110 | ccode2==115 | ccode2==212 | ccode2==260 | ccode2==316 | ccode2==317 | ccode2==331 | ////
 ccode2==338 | ccode2==343 | ccode2==344 | ccode2==346 | ccode2==349 | ccode2==352 | ccode2==359 | ccode2==366 | ////
 ccode2==367 | ccode2==368 | ccode2==369 | ccode2==370| ccode2==371 | ccode2==372 | //// 
ccode2== 373 | ccode2==395 | ccode2==531 |ccode2==701 | ccode2==702 | ccode2==703 | ccode2==704 | ccode2==705 | ccode2==760 | ccode2==781 | ////
ccode2== 835 | ccode2==910 | ccode2==935 |ccode2==940 | ccode2==946  | ccode2==990 | ccode2==365 | ccode2==987 | ccode2==970 | ccode2==955 | ccode2==950 

drop if year<1960

tsset ccode2 year

synth flow gdppc2 gdp2, trunit(325) trperiod(1971)  figure 

*Netherlands - Spain 1961
use "data_for_synth", clear
keep if ccode1==210
drop if ccode2==235| ccode2==325| ccode2==345 | ccode2==350 | ccode2==600 | ccode2==616 | ccode2==640 
drop if ccode2== 31 |ccode2==56 ////
| ccode2==56 | ccode2==53 |ccode2==54 | ccode2==57 | ccode2==58 | ccode2==60 | ccode2==80 ////
| ccode2==110 | ccode2==115 | ccode2==212 | ccode2==260 | ccode2==316 | ccode2==317 | ccode2==331 | ////
 ccode2==338 | ccode2==343 | ccode2==344 | ccode2==346 | ccode2==349 | ccode2==352 | ccode2==359 | ccode2==366 | ////
 ccode2==367 | ccode2==368 | ccode2==369 | ccode2==370| ccode2==371 | ccode2==372 | //// 
ccode2== 373 | ccode2==395 | ccode2==531 |ccode2==701 | ccode2==702 | ccode2==703 | ccode2==704 | ccode2==705 | ccode2==760 | ccode2==781 | ////
ccode2== 835 | ccode2==910 | ccode2==935 |ccode2==940 | ccode2==946  | ccode2==990 | ccode2==365 | ccode2==987 | ccode2==970 | ccode2==955 | ccode2==950 ///
| ccode2==983 | ccode2==986 
drop if year>1985

tsset ccode2 year

synth flow gdppc2 gdp2, trunit(230) trperiod(1961)  figure 

*Netherlands - Portugal 1963

use "data_for_synth", clear
keep if ccode1==210
drop if ccode2==230| ccode2==325| ccode2==345 | ccode2==350 | ccode2==600 | ccode2==616 | ccode2==640 
drop if ccode2== 31 |ccode2==56 ////
| ccode2==56 | ccode2==53 |ccode2==54 | ccode2==57 | ccode2==58 | ccode2==60 | ccode2==80 ////
| ccode2==110 | ccode2==115 | ccode2==212 | ccode2==260 | ccode2==316 | ccode2==317 | ccode2==331 | ////
 ccode2==338 | ccode2==343 | ccode2==344 | ccode2==346 | ccode2==349 | ccode2==352 | ccode2==359 | ccode2==366 | ////
 ccode2==367 | ccode2==368 | ccode2==369 | ccode2==370| ccode2==371 | ccode2==372 | //// 
ccode2== 373 | ccode2==395 | ccode2==531 |ccode2==701 | ccode2==702 | ccode2==703 | ccode2==704 | ccode2==705 | ccode2==760 | ccode2==781 | ////
ccode2== 835 | ccode2==910 | ccode2==935 |ccode2==940 | ccode2==946  | ccode2==990 | ccode2==365 | ccode2==987 | ccode2==970 | ccode2==955 | ccode2==950 
drop if year>1985

tsset ccode2 year

synth flow gdppc2 gdp2, trunit(235) trperiod(1963)  figure 

*Netherlands - Yugoslavia 1970

use "data_for_synth", clear
keep if ccode1==210
drop if ccode2==230| ccode2==325| ccode2==235 | ccode2==350 | ccode2==600 | ccode2==616 | ccode2==640 
drop if ccode2== 31 |ccode2==56 ////
| ccode2==56 | ccode2==53 |ccode2==54 | ccode2==57 | ccode2==58 | ccode2==60 | ccode2==80 ////
| ccode2==110 | ccode2==115 | ccode2==212 | ccode2==260 | ccode2==316 | ccode2==317 | ccode2==331 | ////
 ccode2==338 | ccode2==343 | ccode2==344 | ccode2==346 | ccode2==349 | ccode2==352 | ccode2==359 | ccode2==366 | ////
 ccode2==367 | ccode2==368 | ccode2==369 | ccode2==370| ccode2==371 | ccode2==372 | //// 
ccode2== 373 | ccode2==395 | ccode2==531 |ccode2==701 | ccode2==702 | ccode2==703 | ccode2==704 | ccode2==705 | ccode2==760 | ccode2==781 | ////
ccode2== 835 | ccode2==910 | ccode2==935 |ccode2==940 | ccode2==946  | ccode2==990 | ccode2==365 | ccode2==987 | ccode2==970 | ccode2==955 | ccode2==950 
drop if year>1985

tsset ccode2 year

synth flow gdppc2 gdp2, trunit(345) trperiod(1970)  figure 

*Netherlands - Greece 1966

use "data_for_synth", clear
keep if ccode1==210
drop if ccode2==230| ccode2==325| ccode2==235 | ccode2==245 | ccode2==600 | ccode2==616 | ccode2==640 
drop if ccode2== 31 |ccode2==56 ////
| ccode2==56 | ccode2==53 |ccode2==54 | ccode2==57 | ccode2==58 | ccode2==60 | ccode2==80 ////
| ccode2==110 | ccode2==115 | ccode2==212 | ccode2==260 | ccode2==316 | ccode2==317 | ccode2==331 | ////
 ccode2==338 | ccode2==343 | ccode2==344 | ccode2==346 | ccode2==349 | ccode2==352 | ccode2==359 | ccode2==366 | ////
 ccode2==367 | ccode2==368 | ccode2==369 | ccode2==370| ccode2==371 | ccode2==372 | //// 
ccode2== 373 | ccode2==395 | ccode2==531 |ccode2==701 | ccode2==702 | ccode2==703 | ccode2==704 | ccode2==705 | ccode2==760 | ccode2==781 | ////
ccode2== 835 | ccode2==910 | ccode2==935 |ccode2==940 | ccode2==946  | ccode2==990 | ccode2==365 | ccode2==987 | ccode2==970 | ccode2==955 | ccode2==950 
drop if year>1985

tsset ccode2 year

set more off
synth flow gdppc2 gdp2, trunit(350) trperiod(1966)  figure 

*Netherlands - Morocco 1964


use "data_for_synth", clear
keep if ccode1==210
drop if ccode2==230| ccode2==325| ccode2==235 | ccode2==245 | ccode2==350 | ccode2==616 | ccode2==640 
drop if ccode2== 31 |ccode2==56 ////
| ccode2==56 | ccode2==53 |ccode2==54 | ccode2==57 | ccode2==58 | ccode2==60 | ccode2==80 ////
| ccode2==110 | ccode2==115 | ccode2==212 | ccode2==260 | ccode2==316 | ccode2==317 | ccode2==331 | ////
 ccode2==338 | ccode2==343 | ccode2==344 | ccode2==346 | ccode2==349 | ccode2==352 | ccode2==359 | ccode2==366 | ////
 ccode2==367 | ccode2==368 | ccode2==369 | ccode2==370| ccode2==371 | ccode2==372 | //// 
ccode2== 373 | ccode2==395 | ccode2==531 |ccode2==701 | ccode2==702 | ccode2==703 | ccode2==704 | ccode2==705 | ccode2==760 | ccode2==781 | ////
ccode2== 835 | ccode2==910 | ccode2==935 |ccode2==940 | ccode2==946  | ccode2==990 | ccode2==365 | ccode2==987 | ccode2==970 | ccode2==955 | ccode2==950 
drop if year>1985

tsset ccode2 year

set more off
synth flow gdppc2 gdp2, trunit(600) trperiod(1964)  figure 

*Netherland Tunisia 1971


use "data_for_synth", clear
keep if ccode1==210
drop if ccode2==230| ccode2==325| ccode2==235 | ccode2==245 | ccode2==350 | ccode2==600 | ccode2==640 
drop if ccode2== 31 |ccode2==56 ////
| ccode2==56 | ccode2==53 |ccode2==54 | ccode2==57 | ccode2==58 | ccode2==60 | ccode2==80 ////
| ccode2==110 | ccode2==115 | ccode2==212 | ccode2==260 | ccode2==316 | ccode2==317 | ccode2==331 | ////
 ccode2==338 | ccode2==343 | ccode2==344 | ccode2==346 | ccode2==349 | ccode2==352 | ccode2==359 | ccode2==366 | ////
 ccode2==367 | ccode2==368 | ccode2==369 | ccode2==370| ccode2==371 | ccode2==372 | //// 
ccode2== 373 | ccode2==395 | ccode2==531 |ccode2==701 | ccode2==702 | ccode2==703 | ccode2==704 | ccode2==705 | ccode2==760 | ccode2==781 | ////
ccode2== 835 | ccode2==910 | ccode2==935 |ccode2==940 | ccode2==946  | ccode2==990 | ccode2==365 | ccode2==987 | ccode2==970 | ccode2==955 | ccode2==950 
drop if year>1985

tsset ccode2 year

set more off
synth flow gdppc2 gdp2, trunit(616) trperiod(1971)  figure 

*Netherlands - Turkey 1964

use "data_for_synth", clear
keep if ccode1==210
drop if ccode2==230| ccode2==325| ccode2==235 | ccode2==245 | ccode2==350 | ccode2==600 | ccode2==616 
drop if ccode2== 31 |ccode2==56 ////
| ccode2==56 | ccode2==53 |ccode2==54 | ccode2==57 | ccode2==58 | ccode2==60 | ccode2==80 ////
| ccode2==110 | ccode2==115 | ccode2==212 | ccode2==260 | ccode2==316 | ccode2==317 | ccode2==331 | ////
 ccode2==338 | ccode2==343 | ccode2==344 | ccode2==346 | ccode2==349 | ccode2==352 | ccode2==359 | ccode2==366 | ////
 ccode2==367 | ccode2==368 | ccode2==369 | ccode2==370| ccode2==371 | ccode2==372 | //// 
ccode2== 373 | ccode2==395 | ccode2==531 |ccode2==701 | ccode2==702 | ccode2==703 | ccode2==704 | ccode2==705 | ccode2==760 | ccode2==781 | ////
ccode2== 835 | ccode2==910 | ccode2==935 |ccode2==940 | ccode2==946  | ccode2==990 | ccode2==365 | ccode2==987 | ccode2==970 | ccode2==955 | ccode2==950 
drop if year>1985

tsset ccode2 year

set more off
synth flow gdppc2 gdp2, trunit(640) trperiod(1964)  figure 

* Belgium - Yugoslavia 1970
use "data_for_synth", clear
keep if ccode1==211
drop if ccode2==230| ccode2==325| ccode2==615 | ccode2==616 | ccode2==640  
drop if ccode2== 31 |ccode2==56 ////
| ccode2==56 | ccode2==53 |ccode2==54 | ccode2==57 | ccode2==58 | ccode2==60 | ccode2==80 ////
| ccode2==110 | ccode2==115 | ccode2==212 | ccode2==260 | ccode2==316 | ccode2==317 | ccode2==331 | ////
 ccode2==338 | ccode2==343 | ccode2==344 | ccode2==346 | ccode2==349 | ccode2==352 | ccode2==359 | ccode2==366 | ////
 ccode2==367 | ccode2==368 | ccode2==369 | ccode2==370| ccode2==371 | ccode2==372 | //// 
ccode2== 373 | ccode2==395 | ccode2==531 |ccode2==701 | ccode2==702 | ccode2==703 | ccode2==704 | ccode2==705 | ccode2==760 | ccode2==781 | ////
ccode2== 835 | ccode2==910 | ccode2==935 |ccode2==940 | ccode2==946  | ccode2==990 | ccode2==365 | ccode2==987 | ccode2==970 | ccode2==955 | ccode2==950 
drop if year>1985

tsset ccode2 year

set more off
synth flow gdppc2 gdp2, trunit(345) trperiod(1970)  figure 

* Belgim - Algeria 1970
use "data_for_synth", clear
keep if ccode1==211
drop if ccode2==230| ccode2==325| ccode2==345 | ccode2==616 | ccode2==640  
drop if ccode2== 31 |ccode2==56 ////
| ccode2==56 | ccode2==53 |ccode2==54 | ccode2==57 | ccode2==58 | ccode2==60 | ccode2==80 ////
| ccode2==110 | ccode2==115 | ccode2==212 | ccode2==260 | ccode2==316 | ccode2==317 | ccode2==331 | ////
 ccode2==338 | ccode2==343 | ccode2==344 | ccode2==346 | ccode2==349 | ccode2==352 | ccode2==359 | ccode2==366 | ////
 ccode2==367 | ccode2==368 | ccode2==369 | ccode2==370| ccode2==371 | ccode2==372 | //// 
ccode2== 373 | ccode2==395 | ccode2==531 |ccode2==701 | ccode2==702 | ccode2==703 | ccode2==704 | ccode2==705 | ccode2==760 | ccode2==781 | ////
ccode2== 835 | ccode2==910 | ccode2==935 |ccode2==940 | ccode2==946  | ccode2==990 | ccode2==365 | ccode2==987 | ccode2==970 | ccode2==955 | ccode2==950 
drop if year>1985

tsset ccode2 year

set more off
synth flow gdppc2 gdp2, trunit(615) trperiod(1970)  figure 


*Belgium - Tunisia 1969
use "data_for_synth", clear
keep if ccode1==211
drop if ccode2==230| ccode2==325| ccode2==345 | ccode2==615 | ccode2==640  
drop if ccode2== 31 |ccode2==56 ////
| ccode2==56 | ccode2==53 |ccode2==54 | ccode2==57 | ccode2==58 | ccode2==60 | ccode2==80 ////
| ccode2==110 | ccode2==115 | ccode2==212 | ccode2==260 | ccode2==316 | ccode2==317 | ccode2==331 | ////
 ccode2==338 | ccode2==343 | ccode2==344 | ccode2==346 | ccode2==349 | ccode2==352 | ccode2==359 | ccode2==366 | ////
 ccode2==367 | ccode2==368 | ccode2==369 | ccode2==370| ccode2==371 | ccode2==372 | //// 
ccode2== 373 | ccode2==395 | ccode2==531 |ccode2==701 | ccode2==702 | ccode2==703 | ccode2==704 | ccode2==705 | ccode2==760 | ccode2==781 | ////
ccode2== 835 | ccode2==910 | ccode2==935 |ccode2==940 | ccode2==946  | ccode2==990 | ccode2==365 | ccode2==987 | ccode2==970 | ccode2==955 | ccode2==950 
drop if year>1985

tsset ccode2 year

set more off
synth flow gdppc2 gdp2, trunit(616) trperiod(1969)  figure 

*Belgium - Turkey 1964

use "data_for_synth", clear
keep if ccode1==211
drop if ccode2==230| ccode2==325| ccode2==345 | ccode2==615 | ccode2==616  
drop if ccode2== 31 |ccode2==56 ////
| ccode2==56 | ccode2==53 |ccode2==54 | ccode2==57 | ccode2==58 | ccode2==60 | ccode2==80 ////
| ccode2==110 | ccode2==115 | ccode2==212 | ccode2==260 | ccode2==316 | ccode2==317 | ccode2==331 | ////
 ccode2==338 | ccode2==343 | ccode2==344 | ccode2==346 | ccode2==349 | ccode2==352 | ccode2==359 | ccode2==366 | ////
 ccode2==367 | ccode2==368 | ccode2==369 | ccode2==370| ccode2==371 | ccode2==372 | //// 
ccode2== 373 | ccode2==395 | ccode2==531 |ccode2==701 | ccode2==702 | ccode2==703 | ccode2==704 | ccode2==705 | ccode2==760 | ccode2==781 | ////
ccode2== 835 | ccode2==910 | ccode2==935 |ccode2==940 | ccode2==946  | ccode2==990 | ccode2==365 | ccode2==987 | ccode2==970 | ccode2==955 | ccode2==950 
drop if year>1985

tsset ccode2 year

set more off
synth flow gdppc2 gdp2, trunit(640) trperiod(1964)  figure 

*Spain - Dominican Republic 2002

use "data_for_synth", clear
keep if ccode1==230
drop if ccode2==70| ccode2==100| ccode2==130 | ccode2==140 | ccode2==290 | ccode2==475 | ccode2==600  
drop if ccode2== 31 |ccode2==56 ////
| ccode2==56 | ccode2==53 |ccode2==54 | ccode2==57 | ccode2==58 | ccode2==60 | ccode2==80 ////
| ccode2==110 | ccode2==115 | ccode2==212 | ccode2==260 | ccode2==316 | ccode2==317 | ccode2==331 | ////
 ccode2==338 | ccode2==343 | ccode2==344 | ccode2==346 | ccode2==349 | ccode2==352 | ccode2==359 | ccode2==366 | ////
 ccode2==367 | ccode2==368 | ccode2==369 | ccode2==370| ccode2==371 | ccode2==372 | //// 
ccode2== 373 | ccode2==395 | ccode2==531 |ccode2==701 | ccode2==702 | ccode2==703 | ccode2==704 | ccode2==705 | ccode2==760 | ccode2==781 | ////
ccode2== 835 | ccode2==910 | ccode2==935 |ccode2==940 | ccode2==946  | ccode2==990 | ccode2==365 | ccode2==987 | ccode2==970 | ccode2==955 | ccode2==950 ////
| ccode2==983 | ccode2==986 | ccode2==680 | ccode2==345 | ccode2==490 | ccode2==522 | ccode2==565 | ccode2==571 | ccode2==591 | ccode2==694 | ccode2==712 | ccode2==713 | ////
ccode2==812 
drop if year==2005

tsset ccode2 year

set more off
synth flow gdppc2 gdp2, trunit(42) trperiod(2002)  figure 

*Spain - Mexico 2001

use "data_for_synth", clear
keep if ccode1==230
drop if ccode2==42| ccode2==100| ccode2==130 | ccode2==140 | ccode2==290 | ccode2==475 | ccode2==600  
drop if ccode2== 31 |ccode2==56 ////
| ccode2==56 | ccode2==53 |ccode2==54 | ccode2==57 | ccode2==58 | ccode2==60 | ccode2==80 ////
| ccode2==110 | ccode2==115 | ccode2==212 | ccode2==260 | ccode2==316 | ccode2==317 | ccode2==331 | ////
 ccode2==338 | ccode2==343 | ccode2==344 | ccode2==346 | ccode2==349 | ccode2==352 | ccode2==359 | ccode2==366 | ////
 ccode2==367 | ccode2==368 | ccode2==369 | ccode2==370| ccode2==371 | ccode2==372 | //// 
ccode2== 373 | ccode2==395 | ccode2==531 |ccode2==701 | ccode2==702 | ccode2==703 | ccode2==704 | ccode2==705 | ccode2==760 | ccode2==781 | ////
ccode2== 835 | ccode2==910 | ccode2==935 |ccode2==940 | ccode2==946  | ccode2==990 | ccode2==365 | ccode2==987 | ccode2==970 | ccode2==955 | ccode2==950 ////
| ccode2==983 | ccode2==986 | ccode2==680 | ccode2==345 | ccode2==490 | ccode2==522 | ccode2==565 | ccode2==571 | ccode2==591 | ccode2==694 | ccode2==712 | ccode2==713 | ////
ccode2==812 
drop if year==2005

tsset ccode2 year

set more off
synth flow gdppc2 gdp2, trunit(70) trperiod(2001)  figure 

*Spain - Colombia 2001 
use "data_for_synth", clear
keep if ccode1==230
drop if ccode2==42| ccode2==70| ccode2==130 | ccode2==140 | ccode2==290 | ccode2==475 | ccode2==600  
drop if ccode2== 31 |ccode2==56 ////
| ccode2==56 | ccode2==53 |ccode2==54 | ccode2==57 | ccode2==58 | ccode2==60 | ccode2==80 ////
| ccode2==110 | ccode2==115 | ccode2==212 | ccode2==260 | ccode2==316 | ccode2==317 | ccode2==331 | ////
 ccode2==338 | ccode2==343 | ccode2==344 | ccode2==346 | ccode2==349 | ccode2==352 | ccode2==359 | ccode2==366 | ////
 ccode2==367 | ccode2==368 | ccode2==369 | ccode2==370| ccode2==371 | ccode2==372 | //// 
ccode2== 373 | ccode2==395 | ccode2==531 |ccode2==701 | ccode2==702 | ccode2==703 | ccode2==704 | ccode2==705 | ccode2==760 | ccode2==781 | ////
ccode2== 835 | ccode2==910 | ccode2==935 |ccode2==940 | ccode2==946  | ccode2==990 | ccode2==365 | ccode2==987 | ccode2==970 | ccode2==955 | ccode2==950 ////
| ccode2==983 | ccode2==986 | ccode2==680 | ccode2==345 | ccode2==490 | ccode2==522 | ccode2==565 | ccode2==571 | ccode2==591 | ccode2==694 | ccode2==712 | ccode2==713 | ////
ccode2==812 
drop if year==2005

tsset ccode2 year

set more off
synth flow gdppc2 gdp2, trunit(100) trperiod(2001)  figure 

*Spain - Ecuador 2001
use "data_for_synth", clear
keep if ccode1==230
drop if ccode2==42| ccode2==70| ccode2==100 | ccode2==140 | ccode2==290 | ccode2==475 | ccode2==600  
drop if ccode2== 31 |ccode2==56 ////
| ccode2==56 | ccode2==53 |ccode2==54 | ccode2==57 | ccode2==58 | ccode2==60 | ccode2==80 ////
| ccode2==110 | ccode2==115 | ccode2==212 | ccode2==260 | ccode2==316 | ccode2==317 | ccode2==331 | ////
 ccode2==338 | ccode2==343 | ccode2==344 | ccode2==346 | ccode2==349 | ccode2==352 | ccode2==359 | ccode2==366 | ////
 ccode2==367 | ccode2==368 | ccode2==369 | ccode2==370| ccode2==371 | ccode2==372 | //// 
ccode2== 373 | ccode2==395 | ccode2==531 |ccode2==701 | ccode2==702 | ccode2==703 | ccode2==704 | ccode2==705 | ccode2==760 | ccode2==781 | ////
ccode2== 835 | ccode2==910 | ccode2==935 |ccode2==940 | ccode2==946  | ccode2==990 | ccode2==365 | ccode2==987 | ccode2==970 | ccode2==955 | ccode2==950 ////
| ccode2==983 | ccode2==986 | ccode2==680 | ccode2==345 | ccode2==490 | ccode2==522 | ccode2==565 | ccode2==571 | ccode2==591 | ccode2==694 | ccode2==712 | ccode2==713 | ////
ccode2==812 
drop if year==2005

tsset ccode2 year

set more off
synth flow gdppc2 gdp2, trunit(130) trperiod(2001)  figure 

*Spain - Brazil 2003

use "data_for_synth", clear
keep if ccode1==230
drop if ccode2==42| ccode2==70| ccode2==100 | ccode2==130 | ccode2==290 | ccode2==475 | ccode2==600  
drop if ccode2== 31 |ccode2==56 ////
| ccode2==56 | ccode2==53 |ccode2==54 | ccode2==57 | ccode2==58 | ccode2==60 | ccode2==80 ////
| ccode2==110 | ccode2==115 | ccode2==212 | ccode2==260 | ccode2==316 | ccode2==317 | ccode2==331 | ////
 ccode2==338 | ccode2==343 | ccode2==344 | ccode2==346 | ccode2==349 | ccode2==352 | ccode2==359 | ccode2==366 | ////
 ccode2==367 | ccode2==368 | ccode2==369 | ccode2==370| ccode2==371 | ccode2==372 | //// 
ccode2== 373 | ccode2==395 | ccode2==531 |ccode2==701 | ccode2==702 | ccode2==703 | ccode2==704 | ccode2==705 | ccode2==760 | ccode2==781 | ////
ccode2== 835 | ccode2==910 | ccode2==935 |ccode2==940 | ccode2==946  | ccode2==990 | ccode2==365 | ccode2==987 | ccode2==970 | ccode2==955 | ccode2==950 ////
| ccode2==983 | ccode2==986 | ccode2==680 | ccode2==345 | ccode2==490 | ccode2==522 | ccode2==565 | ccode2==571 | ccode2==591 | ccode2==694 | ccode2==712 | ccode2==713 | ////
ccode2==812 
drop if year==2005

tsset ccode2 year

set more off
synth flow gdppc2 gdp2, trunit(140) trperiod(2003)  figure 

* Spain - Poland 2002

use "data_for_synth", clear
keep if ccode1==230
drop if ccode2==42| ccode2==70| ccode2==100 | ccode2==130 | ccode2==140 | ccode2==475 | ccode2==600  
drop if ccode2== 31 |ccode2==56 ////
| ccode2==56 | ccode2==53 |ccode2==54 | ccode2==57 | ccode2==58 | ccode2==60 | ccode2==80 ////
| ccode2==110 | ccode2==115 | ccode2==212 | ccode2==260 | ccode2==316 | ccode2==317 | ccode2==331 | ////
 ccode2==338 | ccode2==343 | ccode2==344 | ccode2==346 | ccode2==349 | ccode2==352 | ccode2==359 | ccode2==366 | ////
 ccode2==367 | ccode2==368 | ccode2==369 | ccode2==370| ccode2==371 | ccode2==372 | //// 
ccode2== 373 | ccode2==395 | ccode2==531 |ccode2==701 | ccode2==702 | ccode2==703 | ccode2==704 | ccode2==705 | ccode2==760 | ccode2==781 | ////
ccode2== 835 | ccode2==910 | ccode2==935 |ccode2==940 | ccode2==946  | ccode2==990 | ccode2==365 | ccode2==987 | ccode2==970 | ccode2==955 | ccode2==950 ////
| ccode2==983 | ccode2==986 | ccode2==680 | ccode2==345 | ccode2==490 | ccode2==522 | ccode2==565 | ccode2==571 | ccode2==591 | ccode2==694 | ccode2==712 | ccode2==713 | ////
ccode2==812 
drop if year==2005

tsset ccode2 year

set more off
synth flow gdppc2 gdp2, trunit(290) trperiod(2002)  figure 

*Spain - Romania 2002

use "data_for_synth", clear
keep if ccode1==230
drop if ccode2==42| ccode2==70| ccode2==100 | ccode2==130 | ccode2==140 | ccode2==290| ccode2==475 | ccode2==600  
drop if ccode2== 31 |ccode2==56 ////
| ccode2==56 | ccode2==53 |ccode2==54 | ccode2==57 | ccode2==58 | ccode2==60 | ccode2==80 ////
| ccode2==110 | ccode2==115 | ccode2==212 | ccode2==260 | ccode2==316 | ccode2==317 | ccode2==331 | ////
 ccode2==338 | ccode2==343 | ccode2==344 | ccode2==346 | ccode2==349 | ccode2==352 | ccode2==359 | ccode2==366 | ////
 ccode2==367 | ccode2==368 | ccode2==369 | ccode2==370| ccode2==371 | ccode2==372 | //// 
ccode2== 373 | ccode2==395 | ccode2==531 |ccode2==701 | ccode2==702 | ccode2==703 | ccode2==704 | ccode2==705 | ccode2==760 | ccode2==781 | ////
ccode2== 835 | ccode2==910 | ccode2==935 |ccode2==940 | ccode2==946  | ccode2==990 | ccode2==365 | ccode2==987 | ccode2==970 | ccode2==955 | ccode2==950 ////
| ccode2==983 | ccode2==986 | ccode2==680 | ccode2==345 | ccode2==490 | ccode2==522 | ccode2==565 | ccode2==571 | ccode2==591 | ccode2==694 | ccode2==712 | ccode2==713 | ////
ccode2==812 
drop if year==2005

tsset ccode2 year

set more off
synth flow gdppc2 gdp2, trunit(360) trperiod(2002)  figure 

*Spain - Morocco 2001

use "data_for_synth", clear
keep if ccode1==230
drop if ccode2==42| ccode2==70| ccode2==100 | ccode2==130 | ccode2==140 | ccode2==290| ccode2==475 | ccode2==360  
drop if ccode2== 31 |ccode2==56 ////
| ccode2==56 | ccode2==53 |ccode2==54 | ccode2==57 | ccode2==58 | ccode2==60 | ccode2==80 ////
| ccode2==110 | ccode2==115 | ccode2==212 | ccode2==260 | ccode2==316 | ccode2==317 | ccode2==331 | ////
 ccode2==338 | ccode2==343 | ccode2==344 | ccode2==346 | ccode2==349 | ccode2==352 | ccode2==359 | ccode2==366 | ////
 ccode2==367 | ccode2==368 | ccode2==369 | ccode2==370| ccode2==371 | ccode2==372 | //// 
ccode2== 373 | ccode2==395 | ccode2==531 |ccode2==701 | ccode2==702 | ccode2==703 | ccode2==704 | ccode2==705 | ccode2==760 | ccode2==781 | ////
ccode2== 835 | ccode2==910 | ccode2==935 |ccode2==940 | ccode2==946  | ccode2==990 | ccode2==365 | ccode2==987 | ccode2==970 | ccode2==955 | ccode2==950 ////
| ccode2==983 | ccode2==986 | ccode2==680 | ccode2==345 | ccode2==490 | ccode2==522 | ccode2==565 | ccode2==571 | ccode2==591 | ccode2==694 | ccode2==712 | ccode2==713 | ////
ccode2==812 
drop if year==2005

tsset ccode2 year

set more off
synth flow gdppc2 gdp2, trunit(600) trperiod(2001)  figure 

*Germany - Poland 1979

use "data_for_synth", clear
keep if ccode1==255
drop if ccode2==310| ccode2==315| ccode2==317 | ccode2==339 | ccode2==344 | ccode2==345| ccode2==349 | ccode2==355 |  ccode2==360 | ////
ccode2==365 | ccode2==366 | ccode2==367 | ccode2==368 | ccode2==385 | ccode2==310
drop if ccode2== 31 |ccode2==56 ////
| ccode2==56 | ccode2==53 |ccode2==54 | ccode2==57 | ccode2==58 | ccode2==60 | ccode2==80 ////
| ccode2==110 | ccode2==115 | ccode2==212 | ccode2==260 | ccode2==316 | ccode2==317 | ccode2==331 | ////
 ccode2==338 | ccode2==343 | ccode2==344 | ccode2==346 | ccode2==349 | ccode2==352 | ccode2==359 | ccode2==366 | ////
 ccode2==367 | ccode2==368 | ccode2==369 | ccode2==370| ccode2==371 | ccode2==372 | //// 
ccode2== 373 | ccode2==395 | ccode2==531 |ccode2==701 | ccode2==702 | ccode2==703 | ccode2==704 | ccode2==705 | ccode2==760 | ccode2==781 | ////
ccode2== 835 | ccode2==910 | ccode2==935 |ccode2==940 | ccode2==946  | ccode2==990 | ccode2==365 | ccode2==987 | ccode2==970 | ccode2==955 | ccode2==950 ////
| ccode2==983 | ccode2==986 | ccode2==680 | ccode2==345 | ccode2==490 | ccode2==522 | ccode2==565 | ccode2==571 | ccode2==591 | ccode2==694 | ccode2==712 | ccode2==713 | ////
ccode2==812 |ccode2==402 | ccode2==403 | ccode2==411 | ccode2==570 | ccode2==572 | ccode2==581 | ccode2==590 | ////
ccode2==692 | ccode2==698 | ccode2==830 


tsset ccode2 year

set more off
synth flow gdppc2 gdp2, trunit(290) trperiod(1979)  figure 

*Germany - Hungary 1989

use "data_for_synth", clear
keep if ccode1==255
drop if ccode2==290| ccode2==315| ccode2==317 | ccode2==339 | ccode2==344 | ccode2==345| ccode2==349 | ccode2==355 |  ccode2==360 | ////
ccode2==365 | ccode2==366 | ccode2==367 | ccode2==368 | ccode2==385 
drop if ccode2== 31 |ccode2==56 ////
| ccode2==56 | ccode2==53 |ccode2==54 | ccode2==57 | ccode2==58 | ccode2==60 | ccode2==80 ////
| ccode2==110 | ccode2==115 | ccode2==212 | ccode2==260 | ccode2==316 | ccode2==317 | ccode2==331 | ////
 ccode2==338 | ccode2==343 | ccode2==344 | ccode2==346 | ccode2==349 | ccode2==352 | ccode2==359 | ccode2==366 | ////
 ccode2==367 | ccode2==368 | ccode2==369 | ccode2==370| ccode2==371 | ccode2==372 | //// 
ccode2== 373 | ccode2==395 | ccode2==531 |ccode2==701 | ccode2==702 | ccode2==703 | ccode2==704 | ccode2==705 | ccode2==760 | ccode2==781 | ////
ccode2== 835 | ccode2==910 | ccode2==935 |ccode2==940 | ccode2==946  | ccode2==990 | ccode2==365 | ccode2==987 | ccode2==970 | ccode2==955 | ccode2==950 ////
| ccode2==983 | ccode2==986 | ccode2==680 | ccode2==345 | ccode2==490 | ccode2==522 | ccode2==565 | ccode2==571 | ccode2==591 | ccode2==694 | ccode2==712 | ccode2==713 | ////
ccode2==812 |ccode2==402 | ccode2==403 | ccode2==411 | ccode2==570 | ccode2==572 | ccode2==581 | ccode2==590 | ////
ccode2==692 | ccode2==698 | ccode2==830 

tsset ccode2 year

set more off
synth flow gdppc2 gdp2, trunit(310) trperiod(1989)  figure 

*Germany - Albania 1991

use "data_for_synth", clear
keep if ccode1==255
drop if ccode2==290| ccode2==310| ccode2==317  | ccode2==344 | ccode2==345| ccode2==349 | ccode2==355 |  ccode2==360 | ////
ccode2==365 | ccode2==366 | ccode2==367 | ccode2==368 | ccode2==385 
drop if ccode2== 31 |ccode2==56 ////
| ccode2==56 | ccode2==53 |ccode2==54 | ccode2==57 | ccode2==58 | ccode2==60 | ccode2==80 ////
| ccode2==110 | ccode2==115 | ccode2==212 | ccode2==260 | ccode2==316 | ccode2==317 | ccode2==331 | ////
 ccode2==338 | ccode2==343 | ccode2==344 | ccode2==346 | ccode2==349 | ccode2==352 | ccode2==359 | ccode2==366 | ////
 ccode2==367 | ccode2==368 | ccode2==369 | ccode2==370| ccode2==371 | ccode2==372 | //// 
ccode2== 373 | ccode2==395 | ccode2==531 |ccode2==701 | ccode2==702 | ccode2==703 | ccode2==704 | ccode2==705 | ccode2==760 | ccode2==781 | ////
ccode2== 835 | ccode2==910 | ccode2==935 |ccode2==940 | ccode2==946  | ccode2==990 | ccode2==365 | ccode2==987 | ccode2==970 | ccode2==955 | ccode2==950 ////
| ccode2==983 | ccode2==986 | ccode2==680 | ccode2==345 | ccode2==490 | ccode2==522 | ccode2==565 | ccode2==571 | ccode2==591 | ccode2==694 | ccode2==712 | ccode2==713 | ////
ccode2==812 |ccode2==402 | ccode2==403 | ccode2==411 | ccode2==570 | ccode2==572 | ccode2==581 | ccode2==590 | ////
ccode2==692 | ccode2==698 | ccode2==830 

tsset ccode2 year

set more off
synth flow gdppc2 gdp2, trunit(339) trperiod(1991)  figure 

*Germany - Bulgaria 1991

use "data_for_synth", clear
keep if ccode1==255
drop if ccode2==290| ccode2==310| ccode2==317  | ccode2==344 | ccode2==345| ccode2==349 | ccode2==339 |  ccode2==360 | ////
ccode2==365 | ccode2==366 | ccode2==367 | ccode2==368 | ccode2==385 
drop if ccode2== 31 |ccode2==56 ////
| ccode2==56 | ccode2==53 |ccode2==54 | ccode2==57 | ccode2==58 | ccode2==60 | ccode2==80 ////
| ccode2==110 | ccode2==115 | ccode2==212 | ccode2==260 | ccode2==316 | ccode2==317 | ccode2==331 | ////
 ccode2==338 | ccode2==343 | ccode2==344 | ccode2==346 | ccode2==349 | ccode2==352 | ccode2==359 | ccode2==366 | ////
 ccode2==367 | ccode2==368 | ccode2==369 | ccode2==370| ccode2==371 | ccode2==372 | //// 
ccode2== 373 | ccode2==395 | ccode2==531 |ccode2==701 | ccode2==702 | ccode2==703 | ccode2==704 | ccode2==705 | ccode2==760 | ccode2==781 | ////
ccode2== 835 | ccode2==910 | ccode2==935 |ccode2==940 | ccode2==946  | ccode2==990 | ccode2==365 | ccode2==987 | ccode2==970 | ccode2==955 | ccode2==950 ////
| ccode2==983 | ccode2==986 | ccode2==680 | ccode2==345 | ccode2==490 | ccode2==522 | ccode2==565 | ccode2==571 | ccode2==591 | ccode2==694 | ccode2==712 | ccode2==713 | ////
ccode2==812 |ccode2==402 | ccode2==403 | ccode2==411 | ccode2==570 | ccode2==572 | ccode2==581 | ccode2==590 | ////
ccode2==692 | ccode2==698 | ccode2==830 

tsset ccode2 year

set more off
synth flow gdppc2 gdp2, trunit(355) trperiod(1991)  figure 

* Germany - Romania 1990

use "data_for_synth", clear
keep if ccode1==255
drop if ccode2==290| ccode2==310| ccode2==317  | ccode2==344 | ccode2==345| ccode2==349 | ccode2==339 |  ccode2==355 | ////
ccode2==365 | ccode2==366 | ccode2==367 | ccode2==368 | ccode2==385 
drop if ccode2== 31 |ccode2==56 ////
| ccode2==56 | ccode2==53 |ccode2==54 | ccode2==57 | ccode2==58 | ccode2==60 | ccode2==80 ////
| ccode2==110 | ccode2==115 | ccode2==212 | ccode2==260 | ccode2==316 | ccode2==317 | ccode2==331 | ////
 ccode2==338 | ccode2==343 | ccode2==344 | ccode2==346 | ccode2==349 | ccode2==352 | ccode2==359 | ccode2==366 | ////
 ccode2==367 | ccode2==368 | ccode2==369 | ccode2==370| ccode2==371 | ccode2==372 | //// 
ccode2== 373 | ccode2==395 | ccode2==531 |ccode2==701 | ccode2==702 | ccode2==703 | ccode2==704 | ccode2==705 | ccode2==760 | ccode2==781 | ////
ccode2== 835 | ccode2==910 | ccode2==935 |ccode2==940 | ccode2==946  | ccode2==990 | ccode2==365 | ccode2==987 | ccode2==970 | ccode2==955 | ccode2==950 ////
| ccode2==983 | ccode2==986 | ccode2==680 | ccode2==345 | ccode2==490 | ccode2==522 | ccode2==565 | ccode2==571 | ccode2==591 | ccode2==694 | ccode2==712 | ccode2==713 | ////
ccode2==812 |ccode2==402 | ccode2==403 | ccode2==411 | ccode2==570 | ccode2==572 | ccode2==581 | ccode2==590 | ////
ccode2==692 | ccode2==698 | ccode2==830 

tsset ccode2 year

set more off
synth flow gdppc2 gdp2, trunit(360) trperiod(1990)  figure 

*Germany - Norway 1997
use "data_for_synth", clear
keep if ccode1==255
drop if ccode2==290| ccode2==310| ccode2==317  | ccode2==344 | ccode2==345| ccode2==349 | ccode2==339 |  ccode2==355 | ////
ccode2==365 | ccode2==366 | ccode2==367 | ccode2==368 | ccode2== 360 
drop if ccode2== 31 |ccode2==56 ////
| ccode2==56 | ccode2==53 |ccode2==54 | ccode2==57 | ccode2==58 | ccode2==60 | ccode2==80 ////
| ccode2==110 | ccode2==115 | ccode2==212 | ccode2==260 | ccode2==316 | ccode2==317 | ccode2==331 | ////
 ccode2==338 | ccode2==343 | ccode2==344 | ccode2==346 | ccode2==349 | ccode2==352 | ccode2==359 | ccode2==366 | ////
 ccode2==367 | ccode2==368 | ccode2==369 | ccode2==370| ccode2==371 | ccode2==372 | //// 
ccode2== 373 | ccode2==395 | ccode2==531 |ccode2==701 | ccode2==702 | ccode2==703 | ccode2==704 | ccode2==705 | ccode2==760 | ccode2==781 | ////
ccode2== 835 | ccode2==910 | ccode2==935 |ccode2==940 | ccode2==946  | ccode2==990 | ccode2==365 | ccode2==987 | ccode2==970 | ccode2==955 | ccode2==950 ////
| ccode2==983 | ccode2==986 | ccode2==680 | ccode2==345 | ccode2==490 | ccode2==522 | ccode2==565 | ccode2==571 | ccode2==591 | ccode2==694 | ccode2==712 | ccode2==713 | ////
ccode2==812 |ccode2==402 | ccode2==403 | ccode2==411 | ccode2==570 | ccode2==572 | ccode2==581 | ccode2==590 | ////
ccode2==692 | ccode2==698 | ccode2==830 

tsset ccode2 year

set more off
synth flow gdppc2 gdp2, trunit(385) trperiod(1997)  figure 


*Italy - Albania 1997

use "data_for_synth", clear
keep if ccode1==325
drop if ccode2==616
drop if ccode2== 31 |ccode2==56 ////
| ccode2==56 | ccode2==53 |ccode2==54 | ccode2==57 | ccode2==58 | ccode2==60 | ccode2==80 ////
| ccode2==110 | ccode2==115 | ccode2==212 | ccode2==260 | ccode2==316 | ccode2==317 | ccode2==331 | ////
 ccode2==338 | ccode2==343 | ccode2==344 | ccode2==346 | ccode2==349 | ccode2==352 | ccode2==359 | ccode2==366 | ////
 ccode2==367 | ccode2==368 | ccode2==369 | ccode2==370| ccode2==371 | ccode2==372 | //// 
ccode2== 373 | ccode2==395 | ccode2==531 |ccode2==701 | ccode2==702 | ccode2==703 | ccode2==704 | ccode2==705 | ccode2==760 | ccode2==781 | ////
ccode2== 835 | ccode2==910 | ccode2==935 |ccode2==940 | ccode2==946  | ccode2==990 | ccode2==365 | ccode2==987 | ccode2==970 | ccode2==955 | ccode2==950 ////
| ccode2==983 | ccode2==986 | ccode2==680 | ccode2==345 | ccode2==490 | ccode2==522 | ccode2==565 | ccode2==571 | ccode2==591 | ccode2==694 | ccode2==712 | ccode2==713 | ////
ccode2==812 |ccode2==402 | ccode2==403 | ccode2==411 | ccode2==570 | ccode2==572 | ccode2==581 | ccode2==590 | ////
ccode2==692 | ccode2==698 | ccode2==830 
drop if year>2000

tsset ccode2 year

set more off
synth flow gdppc2 gdp2, trunit(339) trperiod(1997)  figure 

*Sweden - Yugoslavia 1966

use "data_for_synth", clear
keep if ccode1==380
drop if ccode2==325 | ccode2==541 | ccode2==640
drop if ccode2== 31 |ccode2==56 ////
| ccode2==56 | ccode2==53 |ccode2==54 | ccode2==57 | ccode2==58 | ccode2==60 | ccode2==80 ////
| ccode2==110 | ccode2==115 | ccode2==212 | ccode2==260 | ccode2==316 | ccode2==317 | ccode2==331 | ////
 ccode2==338 | ccode2==343 | ccode2==344 | ccode2==346 | ccode2==349 | ccode2==352 | ccode2==359 | ccode2==366 | ////
 ccode2==367 | ccode2==368 | ccode2==369 | ccode2==370| ccode2==371 | ccode2==372 | //// 
ccode2== 373 | ccode2==395 | ccode2==531 |ccode2==701 | ccode2==702 | ccode2==703 | ccode2==704 | ccode2==705 | ccode2==760 | ccode2==781 | ////
ccode2== 835 | ccode2==910 | ccode2==935 |ccode2==940 | ccode2==946  | ccode2==990 | ccode2==365 | ccode2==987 | ccode2==970 | ccode2==955 | ccode2==950 ////
| ccode2==983 | ccode2==986 | ccode2==680 |  ccode2==490 | ccode2==522 | ccode2==565 | ccode2==571 | ccode2==591 | ccode2==694 | ccode2==712 | ccode2==713 | ////
ccode2==812 |ccode2==402 | ccode2==403 | ccode2==411 | ccode2==570 | ccode2==572 | ccode2==581 | ccode2==590 | ////
ccode2==692 | ccode2==698 | ccode2==830 


tsset ccode2 year

set more off
synth flow gdppc2 gdp2, trunit(345) trperiod(1966)  figure 

*Sweden - Mozambique 1976


use "data_for_synth", clear
keep if ccode1==380
drop if ccode2==325 | ccode2==345 | ccode2==640
drop if ccode2== 31 |ccode2==56 ////
| ccode2==56 | ccode2==53 |ccode2==54 | ccode2==57 | ccode2==58 | ccode2==60 | ccode2==80 ////
| ccode2==110 | ccode2==115 | ccode2==212 | ccode2==260 | ccode2==316 | ccode2==317 | ccode2==331 | ////
 ccode2==338 | ccode2==343 | ccode2==344 | ccode2==346 | ccode2==349 | ccode2==352 | ccode2==359 | ccode2==366 | ////
 ccode2==367 | ccode2==368 | ccode2==369 | ccode2==370| ccode2==371 | ccode2==372 | //// 
ccode2== 373 | ccode2==395 | ccode2==531 |ccode2==701 | ccode2==702 | ccode2==703 | ccode2==704 | ccode2==705 | ccode2==760 | ccode2==781 | ////
ccode2== 835 | ccode2==910 | ccode2==935 |ccode2==940 | ccode2==946  | ccode2==990 | ccode2==365 | ccode2==987 | ccode2==970 | ccode2==955 | ccode2==950 ////
| ccode2==983 | ccode2==986 | ccode2==680 |  ccode2==490 | ccode2==522 | ccode2==565 | ccode2==571 | ccode2==591 | ccode2==694 | ccode2==712 | ccode2==713 | ////
ccode2==812 |ccode2==402 | ccode2==403 | ccode2==411 | ccode2==570 | ccode2==572 | ccode2==581 | ccode2==590 | ////
ccode2==692 | ccode2==698 | ccode2==830 


tsset ccode2 year

set more off
synth flow gdppc2 gdp2, trunit(541) trperiod(1976)  figure 

*Sweden - Turkey 1967

use "data_for_synth", clear
keep if ccode1==380
drop if ccode2==325 | ccode2==345 | ccode2==541
drop if ccode2== 31 |ccode2==56 ////
| ccode2==56 | ccode2==53 |ccode2==54 | ccode2==57 | ccode2==58 | ccode2==60 | ccode2==80 ////
| ccode2==110 | ccode2==115 | ccode2==212 | ccode2==260 | ccode2==316 | ccode2==317 | ccode2==331 | ////
 ccode2==338 | ccode2==343 | ccode2==344 | ccode2==346 | ccode2==349 | ccode2==352 | ccode2==359 | ccode2==366 | ////
 ccode2==367 | ccode2==368 | ccode2==369 | ccode2==370| ccode2==371 | ccode2==372 | //// 
ccode2== 373 | ccode2==395 | ccode2==531 |ccode2==701 | ccode2==702 | ccode2==703 | ccode2==704 | ccode2==705 | ccode2==760 | ccode2==781 | ////
ccode2== 835 | ccode2==910 | ccode2==935 |ccode2==940 | ccode2==946  | ccode2==990 | ccode2==365 | ccode2==987 | ccode2==970 | ccode2==955 | ccode2==950 ////
| ccode2==983 | ccode2==986 | ccode2==680 |  ccode2==490 | ccode2==522 | ccode2==565 | ccode2==571 | ccode2==591 | ccode2==694 | ccode2==712 | ccode2==713 | ////
ccode2==812 |ccode2==402 | ccode2==403 | ccode2==411 | ccode2==570 | ccode2==572 | ccode2==581 | ccode2==590 | ////
ccode2==692 | ccode2==698 | ccode2==830 


tsset ccode2 year

set more off
synth flow gdppc2 gdp2, trunit(640) trperiod(1967)  figure 

*Norway - Germany 1997

use "data_for_synth", clear
keep if ccode1==385
drop if ccode2==290 | ccode2==840
drop if ccode2== 31 |ccode2==56 ////
| ccode2==56 | ccode2==53 |ccode2==54 | ccode2==57 | ccode2==58 | ccode2==60 | ccode2==80 ////
| ccode2==110 | ccode2==115 | ccode2==212 | ccode2==260 | ccode2==316 | ccode2==317 | ccode2==331 | ////
 ccode2==338 | ccode2==343 | ccode2==344 | ccode2==346 | ccode2==349 | ccode2==352 | ccode2==359 | ccode2==366 | ////
 ccode2==367 | ccode2==368 | ccode2==369 | ccode2==370| ccode2==371 | ccode2==372 | //// 
ccode2== 373 | ccode2==395 | ccode2==531 |ccode2==701 | ccode2==702 | ccode2==703 | ccode2==704 | ccode2==705 | ccode2==760 | ccode2==781 | ////
ccode2== 835 | ccode2==910 | ccode2==935 |ccode2==940 | ccode2==946  | ccode2==990 | ccode2==365 | ccode2==987 | ccode2==970 | ccode2==955 | ccode2==950 ////
| ccode2==983 | ccode2==986 | ccode2==680 |  ccode2==490 | ccode2==522 | ccode2==565 | ccode2==571 | ccode2==591 | ccode2==694 | ccode2==712 | ccode2==713 | ////
ccode2==812 |ccode2==402 | ccode2==403 | ccode2==411 | ccode2==570 | ccode2==572 | ccode2==581 | ccode2==590 | ////
ccode2==692 | ccode2==698 | ccode2==830 | ccode2==482 |ccode2==345
drop if year<1980

tsset ccode2 year

set more off
synth flow gdppc2 gdp2, trunit(255) trperiod(1997)  figure 

*Norway - Poland 2002

use "data_for_synth", clear
keep if ccode1==385
drop if ccode2==255 | ccode2==840
drop if ccode2== 31 |ccode2==56 ////
| ccode2==56 | ccode2==53 |ccode2==54 | ccode2==57 | ccode2==58 | ccode2==60 | ccode2==80 ////
| ccode2==110 | ccode2==115 | ccode2==212 | ccode2==260 | ccode2==316 | ccode2==317 | ccode2==331 | ////
 ccode2==338 | ccode2==343 | ccode2==344 | ccode2==346 | ccode2==349 | ccode2==352 | ccode2==359 | ccode2==366 | ////
 ccode2==367 | ccode2==368 | ccode2==369 | ccode2==370| ccode2==371 | ccode2==372 | //// 
ccode2== 373 | ccode2==395 | ccode2==531 |ccode2==701 | ccode2==702 | ccode2==703 | ccode2==704 | ccode2==705 | ccode2==760 | ccode2==781 | ////
ccode2== 835 | ccode2==910 | ccode2==935 |ccode2==940 | ccode2==946  | ccode2==990 | ccode2==365 | ccode2==987 | ccode2==970 | ccode2==955 | ccode2==950 ////
| ccode2==983 | ccode2==986 | ccode2==680 |  ccode2==490 | ccode2==522 | ccode2==565 | ccode2==571 | ccode2==591 | ccode2==694 | ccode2==712 | ccode2==713 | ////
ccode2==812 |ccode2==402 | ccode2==403 | ccode2==411 | ccode2==570 | ccode2==572 | ccode2==581 | ccode2==590 | ////
ccode2==692 | ccode2==698 | ccode2==830 | ccode2==482 | ccode2==345
drop if year<1980

tsset ccode2 year

set more off
synth flow gdppc2 gdp2, trunit(290) trperiod(2002)  figure
*Japan - China 1991

use "data_for_synth", clear
keep if ccode1==740
drop if ccode2== 31 |ccode2==56 ////
| ccode2==56 | ccode2==53 |ccode2==54 | ccode2==57 | ccode2==58 | ccode2==60 | ccode2==80 ////
| ccode2==110 | ccode2==115 | ccode2==212 | ccode2==260 | ccode2==316 | ccode2==317 | ccode2==331 | ////
 ccode2==338 | ccode2==343 | ccode2==344 | ccode2==346 | ccode2==349 | ccode2==352 | ccode2==359 | ccode2==366 | ////
 ccode2==367 | ccode2==368 | ccode2==369 | ccode2==370| ccode2==371 | ccode2==372 | //// 
ccode2== 373 | ccode2==395 | ccode2==531 |ccode2==701 | ccode2==702 | ccode2==703 | ccode2==704 | ccode2==705 | ccode2==760 | ccode2==781 | ////
ccode2== 835 | ccode2==910 | ccode2==935 |ccode2==940 | ccode2==946  | ccode2==990 | ccode2==365 | ccode2==987 | ccode2==970 | ccode2==955 | ccode2==950 ////
| ccode2==983 | ccode2==986 | ccode2==680 |  ccode2==490 | ccode2==522 | ccode2==565 | ccode2==571 | ccode2==591 | ccode2==694 | ccode2==712 | ccode2==713 | ////
ccode2==812 |ccode2==402 | ccode2==403 | ccode2==411 | ccode2==570 | ccode2==572 | ccode2==581 | ccode2==590 | ////
ccode2==692 | ccode2==698 | ccode2==830 | ccode2==482 | ccode2==345 | ccode2==800


tsset ccode2 year

set more off
synth flow gdppc2 gdp2, trunit(710) trperiod(1991)  figure

*Australia - Yugoslavia 1970

use "data_for_synth", clear
keep if ccode1==900
drop if ccode2==200 | ccode2==210 | ccode2==260 | ccode2==325 | ccode2==640 
drop if ccode2== 31 |ccode2==56 ////
| ccode2==56 | ccode2==53 |ccode2==54 | ccode2==57 | ccode2==58 | ccode2==60 | ccode2==80 ////
| ccode2==110 | ccode2==115 | ccode2==212 | ccode2==260 | ccode2==316 | ccode2==317 | ccode2==331 | ////
 ccode2==338 | ccode2==343 | ccode2==344 | ccode2==346 | ccode2==349 | ccode2==352 | ccode2==359 | ccode2==366 | ////
 ccode2==367 | ccode2==368 | ccode2==369 | ccode2==370| ccode2==371 | ccode2==372 | //// 
ccode2== 373 | ccode2==395 | ccode2==531 |ccode2==701 | ccode2==702 | ccode2==703 | ccode2==704 | ccode2==705 | ccode2==760 | ccode2==781 | ////
ccode2== 835 | ccode2==910 | ccode2==935 |ccode2==940 | ccode2==946  | ccode2==990 | ccode2==365 | ccode2==987 | ccode2==970 | ccode2==955 | ccode2==950 ////
| ccode2==983 | ccode2==986 | ccode2==680 |  ccode2==490 | ccode2==522 | ccode2==565 | ccode2==571 | ccode2==591 | ccode2==694 | ccode2==712 | ccode2==713 | ////
ccode2==812 |ccode2==402 | ccode2==403 | ccode2==411 | ccode2==570 | ccode2==572 | ccode2==581 | ccode2==590 | ////
ccode2==692 | ccode2==698 | ccode2==830 | ccode2==482| ccode2==800
drop if year>1990

tsset ccode2 year

set more off
synth flow gdppc2 gdp2, trunit(345) trperiod(1970)  figure 

* Australia - Turkey 1967

use "data_for_synth", clear
keep if ccode1==900
drop if ccode2==200 | ccode2==210 | ccode2==260 | ccode2==325 | ccode2==345 
drop if ccode2== 31 |ccode2==56 ////
| ccode2==56 | ccode2==53 |ccode2==54 | ccode2==57 | ccode2==58 | ccode2==60 | ccode2==80 ////
| ccode2==110 | ccode2==115 | ccode2==212 | ccode2==260 | ccode2==316 | ccode2==317 | ccode2==331 | ////
 ccode2==338 | ccode2==343 | ccode2==344 | ccode2==346 | ccode2==349 | ccode2==352 | ccode2==359 | ccode2==366 | ////
 ccode2==367 | ccode2==368 | ccode2==369 | ccode2==370| ccode2==371 | ccode2==372 | //// 
ccode2== 373 | ccode2==395 | ccode2==531 |ccode2==701 | ccode2==702 | ccode2==703 | ccode2==704 | ccode2==705 | ccode2==760 | ccode2==781 | ////
ccode2== 835 | ccode2==910 | ccode2==935 |ccode2==940 | ccode2==946  | ccode2==990 | ccode2==365 | ccode2==987 | ccode2==970 | ccode2==955 | ccode2==950 ////
| ccode2==983 | ccode2==986 | ccode2==680 |  ccode2==490 | ccode2==522 | ccode2==565 | ccode2==571 | ccode2==591 | ccode2==694 | ccode2==712 | ccode2==713 | ////
ccode2==812 |ccode2==402 | ccode2==403 | ccode2==411 | ccode2==570 | ccode2==572 | ccode2==581 | ccode2==590 | ////
ccode2==692 | ccode2==698 | ccode2==830 | ccode2==482| ccode2==800
drop if year>1990

tsset ccode2 year

set more off
synth flow gdppc2 gdp2, trunit(640) trperiod(1967)  figure 

*************************************************************************************
****Ending treaties


*End of Nethelands - Spain

use "data_for_synth", clear
keep if ccode1==210
drop if ccode2==235| ccode2==325| ccode2==345 | ccode2==350 | ccode2==600 | ccode2==616 | ccode2==640 
drop if ccode2== 31 |ccode2==56 ////
| ccode2==56 | ccode2==53 |ccode2==54 | ccode2==57 | ccode2==58 | ccode2==60 | ccode2==80 ////
| ccode2==110 | ccode2==115 | ccode2==212 | ccode2==260 | ccode2==316 | ccode2==317 | ccode2==331 | ////
 ccode2==338 | ccode2==343 | ccode2==344 | ccode2==346 | ccode2==349 | ccode2==352 | ccode2==359 | ccode2==366 | ////
 ccode2==367 | ccode2==368 | ccode2==369 | ccode2==370| ccode2==371 | ccode2==372 | //// 
ccode2== 373 | ccode2==395 | ccode2==531 |ccode2==701 | ccode2==702 | ccode2==703 | ccode2==704 | ccode2==705 | ccode2==760 | ccode2==781 | ////
ccode2== 835 | ccode2==910 | ccode2==935 |ccode2==940 | ccode2==946  | ccode2==990 | ccode2==365 | ccode2==987 | ccode2==970 | ccode2==955 | ccode2==950 ///
| ccode2==983 | ccode2==986 
drop if year>1985

tsset ccode2 year

synth flow gdppc2 gdp2, trunit(230) trperiod(1974)  figure 

*End of Netherlands - Portugal

use "data_for_synth", clear
keep if ccode1==210
drop if ccode2==230| ccode2==325| ccode2==345 | ccode2==350 | ccode2==600 | ccode2==616 | ccode2==640 
drop if ccode2== 31 |ccode2==56 ////
| ccode2==56 | ccode2==53 |ccode2==54 | ccode2==57 | ccode2==58 | ccode2==60 | ccode2==80 ////
| ccode2==110 | ccode2==115 | ccode2==212 | ccode2==260 | ccode2==316 | ccode2==317 | ccode2==331 | ////
 ccode2==338 | ccode2==343 | ccode2==344 | ccode2==346 | ccode2==349 | ccode2==352 | ccode2==359 | ccode2==366 | ////
 ccode2==367 | ccode2==368 | ccode2==369 | ccode2==370| ccode2==371 | ccode2==372 | //// 
ccode2== 373 | ccode2==395 | ccode2==531 |ccode2==701 | ccode2==702 | ccode2==703 | ccode2==704 | ccode2==705 | ccode2==760 | ccode2==781 | ////
ccode2== 835 | ccode2==910 | ccode2==935 |ccode2==940 | ccode2==946  | ccode2==990 | ccode2==365 | ccode2==987 | ccode2==970 | ccode2==955 | ccode2==950 
drop if year>1985

tsset ccode2 year

synth flow gdppc2 gdp2, trunit(235) trperiod(1974)  figure 

*End of Netherlands - Yugoslavia

use "data_for_synth", clear
keep if ccode1==210
drop if ccode2==230| ccode2==325| ccode2==235 | ccode2==350 | ccode2==600 | ccode2==616 | ccode2==640 
drop if ccode2== 31 |ccode2==56 ////
| ccode2==56 | ccode2==53 |ccode2==54 | ccode2==57 | ccode2==58 | ccode2==60 | ccode2==80 ////
| ccode2==110 | ccode2==115 | ccode2==212 | ccode2==260 | ccode2==316 | ccode2==317 | ccode2==331 | ////
 ccode2==338 | ccode2==343 | ccode2==344 | ccode2==346 | ccode2==349 | ccode2==352 | ccode2==359 | ccode2==366 | ////
 ccode2==367 | ccode2==368 | ccode2==369 | ccode2==370| ccode2==371 | ccode2==372 | //// 
ccode2== 373 | ccode2==395 | ccode2==531 |ccode2==701 | ccode2==702 | ccode2==703 | ccode2==704 | ccode2==705 | ccode2==760 | ccode2==781 | ////
ccode2== 835 | ccode2==910 | ccode2==935 |ccode2==940 | ccode2==946  | ccode2==990 | ccode2==365 | ccode2==987 | ccode2==970 | ccode2==955 | ccode2==950 
drop if year>1985

tsset ccode2 year

synth flow gdppc2 gdp2, trunit(345) trperiod(1974)  figure 

*End of Netherlands - Greece

use "data_for_synth", clear
keep if ccode1==210
drop if ccode2==230| ccode2==325| ccode2==235 | ccode2==245 | ccode2==600 | ccode2==616 | ccode2==640 
drop if ccode2== 31 |ccode2==56 ////
| ccode2==56 | ccode2==53 |ccode2==54 | ccode2==57 | ccode2==58 | ccode2==60 | ccode2==80 ////
| ccode2==110 | ccode2==115 | ccode2==212 | ccode2==260 | ccode2==316 | ccode2==317 | ccode2==331 | ////
 ccode2==338 | ccode2==343 | ccode2==344 | ccode2==346 | ccode2==349 | ccode2==352 | ccode2==359 | ccode2==366 | ////
 ccode2==367 | ccode2==368 | ccode2==369 | ccode2==370| ccode2==371 | ccode2==372 | //// 
ccode2== 373 | ccode2==395 | ccode2==531 |ccode2==701 | ccode2==702 | ccode2==703 | ccode2==704 | ccode2==705 | ccode2==760 | ccode2==781 | ////
ccode2== 835 | ccode2==910 | ccode2==935 |ccode2==940 | ccode2==946  | ccode2==990 | ccode2==365 | ccode2==987 | ccode2==970 | ccode2==955 | ccode2==950 
drop if year>1985

tsset ccode2 year

set more off
synth flow gdppc2 gdp2, trunit(350) trperiod(1974)  figure 

*End of Netherlands - Morocco

use "data_for_synth", clear
keep if ccode1==210
drop if ccode2==230| ccode2==325| ccode2==235 | ccode2==245 | ccode2==350 | ccode2==616 | ccode2==640 
drop if ccode2== 31 |ccode2==56 ////
| ccode2==56 | ccode2==53 |ccode2==54 | ccode2==57 | ccode2==58 | ccode2==60 | ccode2==80 ////
| ccode2==110 | ccode2==115 | ccode2==212 | ccode2==260 | ccode2==316 | ccode2==317 | ccode2==331 | ////
 ccode2==338 | ccode2==343 | ccode2==344 | ccode2==346 | ccode2==349 | ccode2==352 | ccode2==359 | ccode2==366 | ////
 ccode2==367 | ccode2==368 | ccode2==369 | ccode2==370| ccode2==371 | ccode2==372 | //// 
ccode2== 373 | ccode2==395 | ccode2==531 |ccode2==701 | ccode2==702 | ccode2==703 | ccode2==704 | ccode2==705 | ccode2==760 | ccode2==781 | ////
ccode2== 835 | ccode2==910 | ccode2==935 |ccode2==940 | ccode2==946  | ccode2==990 | ccode2==365 | ccode2==987 | ccode2==970 | ccode2==955 | ccode2==950 
drop if year>1985

tsset ccode2 year

set more off
synth flow gdppc2 gdp2, trunit(600) trperiod(1974)  figure 

*End of Netherlands - Tunisia

use "data_for_synth", clear
keep if ccode1==210
drop if ccode2==230| ccode2==325| ccode2==235 | ccode2==245 | ccode2==350 | ccode2==600 | ccode2==640 
drop if ccode2== 31 |ccode2==56 ////
| ccode2==56 | ccode2==53 |ccode2==54 | ccode2==57 | ccode2==58 | ccode2==60 | ccode2==80 ////
| ccode2==110 | ccode2==115 | ccode2==212 | ccode2==260 | ccode2==316 | ccode2==317 | ccode2==331 | ////
 ccode2==338 | ccode2==343 | ccode2==344 | ccode2==346 | ccode2==349 | ccode2==352 | ccode2==359 | ccode2==366 | ////
 ccode2==367 | ccode2==368 | ccode2==369 | ccode2==370| ccode2==371 | ccode2==372 | //// 
ccode2== 373 | ccode2==395 | ccode2==531 |ccode2==701 | ccode2==702 | ccode2==703 | ccode2==704 | ccode2==705 | ccode2==760 | ccode2==781 | ////
ccode2== 835 | ccode2==910 | ccode2==935 |ccode2==940 | ccode2==946  | ccode2==990 | ccode2==365 | ccode2==987 | ccode2==970 | ccode2==955 | ccode2==950 
drop if year>1985

tsset ccode2 year

set more off

synth flow gdppc2 gdp2, trunit(616) trperiod(1974)  figure 

*End of Netherlands - Turkey

use "data_for_synth", clear
keep if ccode1==210
drop if ccode2==230| ccode2==325| ccode2==235 | ccode2==245 | ccode2==350 | ccode2==600 | ccode2==616 
drop if ccode2== 31 |ccode2==56 ////
| ccode2==56 | ccode2==53 |ccode2==54 | ccode2==57 | ccode2==58 | ccode2==60 | ccode2==80 ////
| ccode2==110 | ccode2==115 | ccode2==212 | ccode2==260 | ccode2==316 | ccode2==317 | ccode2==331 | ////
 ccode2==338 | ccode2==343 | ccode2==344 | ccode2==346 | ccode2==349 | ccode2==352 | ccode2==359 | ccode2==366 | ////
 ccode2==367 | ccode2==368 | ccode2==369 | ccode2==370| ccode2==371 | ccode2==372 | //// 
ccode2== 373 | ccode2==395 | ccode2==531 |ccode2==701 | ccode2==702 | ccode2==703 | ccode2==704 | ccode2==705 | ccode2==760 | ccode2==781 | ////
ccode2== 835 | ccode2==910 | ccode2==935 |ccode2==940 | ccode2==946  | ccode2==990 | ccode2==365 | ccode2==987 | ccode2==970 | ccode2==955 | ccode2==950 
drop if year>1985

tsset ccode2 year

set more off
synth flow gdppc2 gdp2, trunit(640) trperiod(1974)  figure 

*End of Belgium - Yugoslavia

use "data_for_synth", clear
keep if ccode1==211
drop if ccode2==230| ccode2==325| ccode2==615 | ccode2==616 | ccode2==640  
drop if ccode2== 31 |ccode2==56 ////
| ccode2==56 | ccode2==53 |ccode2==54 | ccode2==57 | ccode2==58 | ccode2==60 | ccode2==80 ////
| ccode2==110 | ccode2==115 | ccode2==212 | ccode2==260 | ccode2==316 | ccode2==317 | ccode2==331 | ////
 ccode2==338 | ccode2==343 | ccode2==344 | ccode2==346 | ccode2==349 | ccode2==352 | ccode2==359 | ccode2==366 | ////
 ccode2==367 | ccode2==368 | ccode2==369 | ccode2==370| ccode2==371 | ccode2==372 | //// 
ccode2== 373 | ccode2==395 | ccode2==531 |ccode2==701 | ccode2==702 | ccode2==703 | ccode2==704 | ccode2==705 | ccode2==760 | ccode2==781 | ////
ccode2== 835 | ccode2==910 | ccode2==935 |ccode2==940 | ccode2==946  | ccode2==990 | ccode2==365 | ccode2==987 | ccode2==970 | ccode2==955 | ccode2==950 
drop if year>1985

tsset ccode2 year

set more off
synth flow gdppc2 gdp2, trunit(345) trperiod(1974)  figure 

*End of Belgium - Turkey

use "data_for_synth", clear
keep if ccode1==211
drop if ccode2==230| ccode2==325| ccode2==345 | ccode2==615 | ccode2==616  
drop if ccode2== 31 |ccode2==56 ////
| ccode2==56 | ccode2==53 |ccode2==54 | ccode2==57 | ccode2==58 | ccode2==60 | ccode2==80 ////
| ccode2==110 | ccode2==115 | ccode2==212 | ccode2==260 | ccode2==316 | ccode2==317 | ccode2==331 | ////
 ccode2==338 | ccode2==343 | ccode2==344 | ccode2==346 | ccode2==349 | ccode2==352 | ccode2==359 | ccode2==366 | ////
 ccode2==367 | ccode2==368 | ccode2==369 | ccode2==370| ccode2==371 | ccode2==372 | //// 
ccode2== 373 | ccode2==395 | ccode2==531 |ccode2==701 | ccode2==702 | ccode2==703 | ccode2==704 | ccode2==705 | ccode2==760 | ccode2==781 | ////
ccode2== 835 | ccode2==910 | ccode2==935 |ccode2==940 | ccode2==946  | ccode2==990 | ccode2==365 | ccode2==987 | ccode2==970 | ccode2==955 | ccode2==950 
drop if year>1985

tsset ccode2 year

set more off
synth flow gdppc2 gdp2, trunit(640) trperiod(1974)  figure

*End of Germany - Poland
use "data_for_synth", clear
keep if ccode1==255
drop if ccode2==310| ccode2==315| ccode2==317 | ccode2==339 | ccode2==344 | ccode2==345| ccode2==349 | ccode2==355 |  ccode2==360 | ////
ccode2==365 | ccode2==366 | ccode2==367 | ccode2==368 | ccode2==385 | ccode2==310
drop if ccode2== 31 |ccode2==56 ////
| ccode2==56 | ccode2==53 |ccode2==54 | ccode2==57 | ccode2==58 | ccode2==60 | ccode2==80 ////
| ccode2==110 | ccode2==115 | ccode2==212 | ccode2==260 | ccode2==316 | ccode2==317 | ccode2==331 | ////
 ccode2==338 | ccode2==343 | ccode2==344 | ccode2==346 | ccode2==349 | ccode2==352 | ccode2==359 | ccode2==366 | ////
 ccode2==367 | ccode2==368 | ccode2==369 | ccode2==370| ccode2==371 | ccode2==372 | //// 
ccode2== 373 | ccode2==395 | ccode2==531 |ccode2==701 | ccode2==702 | ccode2==703 | ccode2==704 | ccode2==705 | ccode2==760 | ccode2==781 | ////
ccode2== 835 | ccode2==910 | ccode2==935 |ccode2==940 | ccode2==946  | ccode2==990 | ccode2==365 | ccode2==987 | ccode2==970 | ccode2==955 | ccode2==950 ////
| ccode2==983 | ccode2==986 | ccode2==680 | ccode2==345 | ccode2==490 | ccode2==522 | ccode2==565 | ccode2==571 | ccode2==591 | ccode2==694 | ccode2==712 | ccode2==713 | ////
ccode2==812 |ccode2==402 | ccode2==403 | ccode2==411 | ccode2==570 | ccode2==572 | ccode2==581 | ccode2==590 | ////
ccode2==692 | ccode2==698 | ccode2==830 


tsset ccode2 year

set more off
synth flow gdppc2 gdp2, trunit(290) trperiod(1996)  figure 

*End of Germany - Bulgaria

use "data_for_synth", clear
keep if ccode1==255
drop if ccode2==290| ccode2==310| ccode2==317  | ccode2==344 | ccode2==345| ccode2==349 | ccode2==339 |  ccode2==360 | ////
ccode2==365 | ccode2==366 | ccode2==367 | ccode2==368 | ccode2==385 
drop if ccode2== 31 |ccode2==56 ////
| ccode2==56 | ccode2==53 |ccode2==54 | ccode2==57 | ccode2==58 | ccode2==60 | ccode2==80 ////
| ccode2==110 | ccode2==115 | ccode2==212 | ccode2==260 | ccode2==316 | ccode2==317 | ccode2==331 | ////
 ccode2==338 | ccode2==343 | ccode2==344 | ccode2==346 | ccode2==349 | ccode2==352 | ccode2==359 | ccode2==366 | ////
 ccode2==367 | ccode2==368 | ccode2==369 | ccode2==370| ccode2==371 | ccode2==372 | //// 
ccode2== 373 | ccode2==395 | ccode2==531 |ccode2==701 | ccode2==702 | ccode2==703 | ccode2==704 | ccode2==705 | ccode2==760 | ccode2==781 | ////
ccode2== 835 | ccode2==910 | ccode2==935 |ccode2==940 | ccode2==946  | ccode2==990 | ccode2==365 | ccode2==987 | ccode2==970 | ccode2==955 | ccode2==950 ////
| ccode2==983 | ccode2==986 | ccode2==680 | ccode2==345 | ccode2==490 | ccode2==522 | ccode2==565 | ccode2==571 | ccode2==591 | ccode2==694 | ccode2==712 | ccode2==713 | ////
ccode2==812 |ccode2==402 | ccode2==403 | ccode2==411 | ccode2==570 | ccode2==572 | ccode2==581 | ccode2==590 | ////
ccode2==692 | ccode2==698 | ccode2==830 

tsset ccode2 year

set more off
synth flow gdppc2 gdp2, trunit(355) trperiod(2002)  figure 

*End of Germany - Spain
 
use "data_for_synth", clear
keep if ccode1==255
drop if ccode2==212| ccode2==235  | ccode2==325 | ccode2==345 | ccode2==350 | ////
 ccode2==600 | ccode2==616 | ccode2==640 | ccode2==732 | ccode2==740 | ccode2==840
drop if ccode2== 31 |ccode2==56 ////
| ccode2==56 | ccode2==53 |ccode2==54 | ccode2==57 | ccode2==58 | ccode2==60 | ccode2==80 ////
| ccode2==110 | ccode2==115 | ccode2==212 | ccode2==260 | ccode2==316 | ccode2==317 | ccode2==331 | ////
 ccode2==338 | ccode2==343 | ccode2==344 | ccode2==346 | ccode2==349 | ccode2==352 | ccode2==359 | ccode2==366 | ////
 ccode2==367 | ccode2==368 | ccode2==369 | ccode2==370| ccode2==371 | ccode2==372 | //// 
ccode2== 373 | ccode2==395 | ccode2==531 |ccode2==701 | ccode2==702 | ccode2==703 | ccode2==704 | ccode2==705 | ccode2==760 | ccode2==781 | ////
ccode2== 835 | ccode2==910 | ccode2==935 |ccode2==940 | ccode2==946  | ccode2==990 | ccode2==365 | ccode2==987 | ccode2==970 | ccode2==955 | ccode2==950 ////
| ccode2==983 | ccode2==986 | ccode2==680 | ccode2==345 | ccode2==490 | ccode2==522 | ccode2==565 | ccode2==571 | ccode2==591 | ccode2==694 | ccode2==712 | ccode2==713 | ////
ccode2==812 |ccode2==402 | ccode2==403 | ccode2==411 | ccode2==570 | ccode2==572 | ccode2==581 | ccode2==590 | ////
ccode2==692 | ccode2==698 | ccode2==830 

tsset ccode2 year

set more off
synth flow gdppc2 gdp2, trunit(230) trperiod(1973)  figure 

*End of Germany - Portugal 

use "data_for_synth", clear
keep if ccode1==255
drop if ccode2==212| ccode2==230  | ccode2==325 | ccode2==345 | ccode2==350 | ////
 ccode2==600 | ccode2==616 | ccode2==640 | ccode2==732 | ccode2==740 | ccode2==840
drop if ccode2== 31 |ccode2==56 ////
| ccode2==56 | ccode2==53 |ccode2==54 | ccode2==57 | ccode2==58 | ccode2==60 | ccode2==80 ////
| ccode2==110 | ccode2==115 | ccode2==212 | ccode2==260 | ccode2==316 | ccode2==317 | ccode2==331 | ////
 ccode2==338 | ccode2==343 | ccode2==344 | ccode2==346 | ccode2==349 | ccode2==352 | ccode2==359 | ccode2==366 | ////
 ccode2==367 | ccode2==368 | ccode2==369 | ccode2==370| ccode2==371 | ccode2==372 | //// 
ccode2== 373 | ccode2==395 | ccode2==531 |ccode2==701 | ccode2==702 | ccode2==703 | ccode2==704 | ccode2==705 | ccode2==760 | ccode2==781 | ////
ccode2== 835 | ccode2==910 | ccode2==935 |ccode2==940 | ccode2==946  | ccode2==990 | ccode2==365 | ccode2==987 | ccode2==970 | ccode2==955 | ccode2==950 ////
| ccode2==983 | ccode2==986 | ccode2==680 | ccode2==345 | ccode2==490 | ccode2==522 | ccode2==565 | ccode2==571 | ccode2==591 | ccode2==694 | ccode2==712 | ccode2==713 | ////
ccode2==812 |ccode2==402 | ccode2==403 | ccode2==411 | ccode2==570 | ccode2==572 | ccode2==581 | ccode2==590 | ////
ccode2==692 | ccode2==698 | ccode2==830 

tsset ccode2 year

set more off
synth flow gdppc2 gdp2, trunit(235) trperiod(1973)  figure 

*End of Germany - Yugoslavia

use "data_for_synth", clear
keep if ccode1==255
drop if ccode2==212| ccode2==230  | ccode2==325 | ccode2==235 | ccode2==350 | ////
 ccode2==600 | ccode2==616 | ccode2==640 | ccode2==732 | ccode2==740 | ccode2==840
drop if ccode2== 31 |ccode2==56 ////
| ccode2==56 | ccode2==53 |ccode2==54 | ccode2==57 | ccode2==58 | ccode2==60 | ccode2==80 ////
| ccode2==110 | ccode2==115 | ccode2==212 | ccode2==260 | ccode2==316 | ccode2==317 | ccode2==331 | ////
 ccode2==338 | ccode2==343 | ccode2==344 | ccode2==346 | ccode2==349 | ccode2==352 | ccode2==359 | ccode2==366 | ////
 ccode2==367 | ccode2==368 | ccode2==369 | ccode2==370| ccode2==371 | ccode2==372 | //// 
ccode2== 373 | ccode2==395 | ccode2==531 |ccode2==701 | ccode2==702 | ccode2==703 | ccode2==704 | ccode2==705 | ccode2==760 | ccode2==781 | ////
ccode2== 835 | ccode2==910 | ccode2==935 |ccode2==940 | ccode2==946  | ccode2==990 | ccode2==365 | ccode2==987 | ccode2==970 | ccode2==955 | ccode2==950 ////
| ccode2==983 | ccode2==986 | ccode2==680| ccode2==490 | ccode2==522 | ccode2==565 | ccode2==571 | ccode2==591 | ccode2==694 | ccode2==712 | ccode2==713 | ////
ccode2==812 |ccode2==402 | ccode2==403 | ccode2==411 | ccode2==570 | ccode2==572 | ccode2==581 | ccode2==590 | ////
ccode2==692 | ccode2==698 | ccode2==830 

tsset ccode2 year

set more off
synth flow gdppc2 gdp2, trunit(345) trperiod(1973)  figure 

*End of Germany - Greece

use "data_for_synth", clear
keep if ccode1==255
drop if ccode2==212| ccode2==230  | ccode2==325 | ccode2==235 | ccode2==345 | ////
 ccode2==600 | ccode2==616 | ccode2==640 | ccode2==732 | ccode2==740 | ccode2==840
drop if ccode2== 31 |ccode2==56 ////
| ccode2==56 | ccode2==53 |ccode2==54 | ccode2==57 | ccode2==58 | ccode2==60 | ccode2==80 ////
| ccode2==110 | ccode2==115 | ccode2==212 | ccode2==260 | ccode2==316 | ccode2==317 | ccode2==331 | ////
 ccode2==338 | ccode2==343 | ccode2==344 | ccode2==346 | ccode2==349 | ccode2==352 | ccode2==359 | ccode2==366 | ////
 ccode2==367 | ccode2==368 | ccode2==369 | ccode2==370| ccode2==371 | ccode2==372 | //// 
ccode2== 373 | ccode2==395 | ccode2==531 |ccode2==701 | ccode2==702 | ccode2==703 | ccode2==704 | ccode2==705 | ccode2==760 | ccode2==781 | ////
ccode2== 835 | ccode2==910 | ccode2==935 |ccode2==940 | ccode2==946  | ccode2==990 | ccode2==365 | ccode2==987 | ccode2==970 | ccode2==955 | ccode2==950 ////
| ccode2==983 | ccode2==986 | ccode2==680 | ccode2==345 | ccode2==490 | ccode2==522 | ccode2==565 | ccode2==571 | ccode2==591 | ccode2==694 | ccode2==712 | ccode2==713 | ////
ccode2==812 |ccode2==402 | ccode2==403 | ccode2==411 | ccode2==570 | ccode2==572 | ccode2==581 | ccode2==590 | ////
ccode2==692 | ccode2==698 | ccode2==830 

tsset ccode2 year

set more off
synth flow gdppc2 gdp2, trunit(350) trperiod(1973)  figure 

*End of Germany - Morocco

use "data_for_synth", clear
keep if ccode1==255
drop if ccode2==212| ccode2==230  | ccode2==325 | ccode2==235 | ccode2==345 | ////
 ccode2==350 | ccode2==616 | ccode2==640 | ccode2==732 | ccode2==740 | ccode2==840
drop if ccode2== 31 |ccode2==56 ////
| ccode2==56 | ccode2==53 |ccode2==54 | ccode2==57 | ccode2==58 | ccode2==60 | ccode2==80 ////
| ccode2==110 | ccode2==115 | ccode2==212 | ccode2==260 | ccode2==316 | ccode2==317 | ccode2==331 | ////
 ccode2==338 | ccode2==343 | ccode2==344 | ccode2==346 | ccode2==349 | ccode2==352 | ccode2==359 | ccode2==366 | ////
 ccode2==367 | ccode2==368 | ccode2==369 | ccode2==370| ccode2==371 | ccode2==372 | //// 
ccode2== 373 | ccode2==395 | ccode2==531 |ccode2==701 | ccode2==702 | ccode2==703 | ccode2==704 | ccode2==705 | ccode2==760 | ccode2==781 | ////
ccode2== 835 | ccode2==910 | ccode2==935 |ccode2==940 | ccode2==946  | ccode2==990 | ccode2==365 | ccode2==987 | ccode2==970 | ccode2==955 | ccode2==950 ////
| ccode2==983 | ccode2==986 | ccode2==680 | ccode2==345 | ccode2==490 | ccode2==522 | ccode2==565 | ccode2==571 | ccode2==591 | ccode2==694 | ccode2==712 | ccode2==713 | ////
ccode2==812 |ccode2==402 | ccode2==403 | ccode2==411 | ccode2==570 | ccode2==572 | ccode2==581 | ccode2==590 | ////
ccode2==692 | ccode2==698 | ccode2==830 

tsset ccode2 year

set more off
synth flow gdppc2 gdp2, trunit(600) trperiod(1973)  figure 

*End of Germany - Tunisia

use "data_for_synth", clear
keep if ccode1==255
drop if ccode2==212| ccode2==230  | ccode2==325 | ccode2==235 | ccode2==345 | ////
 ccode2==350 | ccode2==600 | ccode2==640 | ccode2==732 | ccode2==740 | ccode2==840
drop if ccode2== 31 |ccode2==56 ////
| ccode2==56 | ccode2==53 |ccode2==54 | ccode2==57 | ccode2==58 | ccode2==60 | ccode2==80 ////
| ccode2==110 | ccode2==115 | ccode2==212 | ccode2==260 | ccode2==316 | ccode2==317 | ccode2==331 | ////
 ccode2==338 | ccode2==343 | ccode2==344 | ccode2==346 | ccode2==349 | ccode2==352 | ccode2==359 | ccode2==366 | ////
 ccode2==367 | ccode2==368 | ccode2==369 | ccode2==370| ccode2==371 | ccode2==372 | //// 
ccode2== 373 | ccode2==395 | ccode2==531 |ccode2==701 | ccode2==702 | ccode2==703 | ccode2==704 | ccode2==705 | ccode2==760 | ccode2==781 | ////
ccode2== 835 | ccode2==910 | ccode2==935 |ccode2==940 | ccode2==946  | ccode2==990 | ccode2==365 | ccode2==987 | ccode2==970 | ccode2==955 | ccode2==950 ////
| ccode2==983 | ccode2==986 | ccode2==680 | ccode2==345 | ccode2==490 | ccode2==522 | ccode2==565 | ccode2==571 | ccode2==591 | ccode2==694 | ccode2==712 | ccode2==713 | ////
ccode2==812 |ccode2==402 | ccode2==403 | ccode2==411 | ccode2==570 | ccode2==572 | ccode2==581 | ccode2==590 | ////
ccode2==692 | ccode2==698 | ccode2==830 

tsset ccode2 year

set more off
synth flow gdppc2 gdp2, trunit(616) trperiod(1973)  figure 

*End of Germany - Turkey

use "data_for_synth", clear
keep if ccode1==255
drop if ccode2==212| ccode2==230  | ccode2==325 | ccode2==235 | ccode2==345 | ////
 ccode2==350 | ccode2==600 | ccode2==616 | ccode2==732 | ccode2==740 | ccode2==840
drop if ccode2== 31 |ccode2==56 ////
| ccode2==56 | ccode2==53 |ccode2==54 | ccode2==57 | ccode2==58 | ccode2==60 | ccode2==80 ////
| ccode2==110 | ccode2==115 | ccode2==212 | ccode2==260 | ccode2==316 | ccode2==317 | ccode2==331 | ////
 ccode2==338 | ccode2==343 | ccode2==344 | ccode2==346 | ccode2==349 | ccode2==352 | ccode2==359 | ccode2==366 | ////
 ccode2==367 | ccode2==368 | ccode2==369 | ccode2==370| ccode2==371 | ccode2==372 | //// 
ccode2== 373 | ccode2==395 | ccode2==531 |ccode2==701 | ccode2==702 | ccode2==703 | ccode2==704 | ccode2==705 | ccode2==760 | ccode2==781 | ////
ccode2== 835 | ccode2==910 | ccode2==935 |ccode2==940 | ccode2==946  | ccode2==990 | ccode2==365 | ccode2==987 | ccode2==970 | ccode2==955 | ccode2==950 ////
| ccode2==983 | ccode2==986 | ccode2==680 | ccode2==345 | ccode2==490 | ccode2==522 | ccode2==565 | ccode2==571 | ccode2==591 | ccode2==694 | ccode2==712 | ccode2==713 | ////
ccode2==812 |ccode2==402 | ccode2==403 | ccode2==411 | ccode2==570 | ccode2==572 | ccode2==581 | ccode2==590 | ////
ccode2==692 | ccode2==698 | ccode2==830 

tsset ccode2 year

set more off
synth flow gdppc2 gdp2, trunit(640) trperiod(1973)  figure 

*End of Germany - South Korea
 
use "data_for_synth", clear
keep if ccode1==255
drop if ccode2==212| ccode2==230  | ccode2==325 | ccode2==235 | ccode2==345 | ////
 ccode2==350 | ccode2==600 | ccode2==616 | ccode2==640 | ccode2==740 | ccode2==840
drop if ccode2== 31 |ccode2==56 ////
| ccode2==56 | ccode2==53 |ccode2==54 | ccode2==57 | ccode2==58 | ccode2==60 | ccode2==80 ////
| ccode2==110 | ccode2==115 | ccode2==212 | ccode2==260 | ccode2==316 | ccode2==317 | ccode2==331 | ////
 ccode2==338 | ccode2==343 | ccode2==344 | ccode2==346 | ccode2==349 | ccode2==352 | ccode2==359 | ccode2==366 | ////
 ccode2==367 | ccode2==368 | ccode2==369 | ccode2==370| ccode2==371 | ccode2==372 | //// 
ccode2== 373 | ccode2==395 | ccode2==531 |ccode2==701 | ccode2==702 | ccode2==703 | ccode2==704 | ccode2==705 | ccode2==760 | ccode2==781 | ////
ccode2== 835 | ccode2==910 | ccode2==935 |ccode2==940 | ccode2==946  | ccode2==990 | ccode2==365 | ccode2==987 | ccode2==970 | ccode2==955 | ccode2==950 ////
| ccode2==983 | ccode2==986 | ccode2==680 | ccode2==345 | ccode2==490 | ccode2==522 | ccode2==565 | ccode2==571 | ccode2==591 | ccode2==694 | ccode2==712 | ccode2==713 | ////
ccode2==812 |ccode2==402 | ccode2==403 | ccode2==411 | ccode2==570 | ccode2==572 | ccode2==581 | ccode2==590 | ////
ccode2==692 | ccode2==698 | ccode2==830 

tsset ccode2 year

set more off
synth flow gdppc2 gdp2, trunit(732) trperiod(1973)  figure 

*End of Germany - Japan

use "data_for_synth", clear
keep if ccode1==255
drop if ccode2==212| ccode2==230  | ccode2==325 | ccode2==235 | ccode2==345 | ////
 ccode2==350 | ccode2==600 | ccode2==616 | ccode2==640 | ccode2==732 | ccode2==840
drop if ccode2== 31 |ccode2==56 ////
| ccode2==56 | ccode2==53 |ccode2==54 | ccode2==57 | ccode2==58 | ccode2==60 | ccode2==80 ////
| ccode2==110 | ccode2==115 | ccode2==212 | ccode2==260 | ccode2==316 | ccode2==317 | ccode2==331 | ////
 ccode2==338 | ccode2==343 | ccode2==344 | ccode2==346 | ccode2==349 | ccode2==352 | ccode2==359 | ccode2==366 | ////
 ccode2==367 | ccode2==368 | ccode2==369 | ccode2==370| ccode2==371 | ccode2==372 | //// 
ccode2== 373 | ccode2==395 | ccode2==531 |ccode2==701 | ccode2==702 | ccode2==703 | ccode2==704 | ccode2==705 | ccode2==760 | ccode2==781 | ////
ccode2== 835 | ccode2==910 | ccode2==935 |ccode2==940 | ccode2==946  | ccode2==990 | ccode2==365 | ccode2==987 | ccode2==970 | ccode2==955 | ccode2==950 ////
| ccode2==983 | ccode2==986 | ccode2==680 | ccode2==345 | ccode2==490 | ccode2==522 | ccode2==565 | ccode2==571 | ccode2==591 | ccode2==694 | ccode2==712 | ccode2==713 | ////
ccode2==812 |ccode2==402 | ccode2==403 | ccode2==411 | ccode2==570 | ccode2==572 | ccode2==581 | ccode2==590 | ////
ccode2==692 | ccode2==698 | ccode2==830 

tsset ccode2 year

set more off
synth flow gdppc2 gdp2, trunit(740) trperiod(1973)  figure 

*End of Germany - Philippines

use "data_for_synth", clear
keep if ccode1==255
drop if ccode2==212| ccode2==230  | ccode2==325 | ccode2==235 | ccode2==345 | ////
 ccode2==350 | ccode2==600 | ccode2==616 | ccode2==640 | ccode2==732 | ccode2==740
drop if ccode2== 31 |ccode2==56 ////
| ccode2==56 | ccode2==53 |ccode2==54 | ccode2==57 | ccode2==58 | ccode2==60 | ccode2==80 ////
| ccode2==110 | ccode2==115 | ccode2==212 | ccode2==260 | ccode2==316 | ccode2==317 | ccode2==331 | ////
 ccode2==338 | ccode2==343 | ccode2==344 | ccode2==346 | ccode2==349 | ccode2==352 | ccode2==359 | ccode2==366 | ////
 ccode2==367 | ccode2==368 | ccode2==369 | ccode2==370| ccode2==371 | ccode2==372 | //// 
ccode2== 373 | ccode2==395 | ccode2==531 |ccode2==701 | ccode2==702 | ccode2==703 | ccode2==704 | ccode2==705 | ccode2==760 | ccode2==781 | ////
ccode2== 835 | ccode2==910 | ccode2==935 |ccode2==940 | ccode2==946  | ccode2==990 | ccode2==365 | ccode2==987 | ccode2==970 | ccode2==955 | ccode2==950 ////
| ccode2==983 | ccode2==986 | ccode2==680 | ccode2==345 | ccode2==490 | ccode2==522 | ccode2==565 | ccode2==571 | ccode2==591 | ccode2==694 | ccode2==712 | ccode2==713 | ////
ccode2==812 |ccode2==402 | ccode2==403 | ccode2==411 | ccode2==570 | ccode2==572 | ccode2==581 | ccode2==590 | ////
ccode2==692 | ccode2==698 | ccode2==830 

tsset ccode2 year

set more off
synth flow gdppc2 gdp2, trunit(840) trperiod(1973)  figure 

*End of Sweden - Yugoslavia

use "data_for_synth", clear
keep if ccode1==380
drop if ccode2==325 | ccode2==541 | ccode2==640
drop if ccode2== 31 |ccode2==56 ////
| ccode2==56 | ccode2==53 |ccode2==54 | ccode2==57 | ccode2==58 | ccode2==60 | ccode2==80 ////
| ccode2==110 | ccode2==115 | ccode2==212 | ccode2==260 | ccode2==316 | ccode2==317 | ccode2==331 | ////
 ccode2==338 | ccode2==343 | ccode2==344 | ccode2==346 | ccode2==349 | ccode2==352 | ccode2==359 | ccode2==366 | ////
 ccode2==367 | ccode2==368 | ccode2==369 | ccode2==370| ccode2==371 | ccode2==372 | //// 
ccode2== 373 | ccode2==395 | ccode2==531 |ccode2==701 | ccode2==702 | ccode2==703 | ccode2==704 | ccode2==705 | ccode2==760 | ccode2==781 | ////
ccode2== 835 | ccode2==910 | ccode2==935 |ccode2==940 | ccode2==946  | ccode2==990 | ccode2==365 | ccode2==987 | ccode2==970 | ccode2==955 | ccode2==950 ////
| ccode2==983 | ccode2==986 | ccode2==680 |  ccode2==490 | ccode2==522 | ccode2==565 | ccode2==571 | ccode2==591 | ccode2==694 | ccode2==712 | ccode2==713 | ////
ccode2==812 |ccode2==402 | ccode2==403 | ccode2==411 | ccode2==570 | ccode2==572 | ccode2==581 | ccode2==590 | ////
ccode2==692 | ccode2==698 | ccode2==830 


tsset ccode2 year

set more off
synth flow gdppc2 gdp2, trunit(345) trperiod(1974)  figure 

*End of Australia - Yugoslavia

use "data_for_synth", clear
keep if ccode1==900
drop if ccode2==200 | ccode2==210 | ccode2==260 | ccode2==325 | ccode2==640 
drop if ccode2== 31 |ccode2==56 ////
| ccode2==56 | ccode2==53 |ccode2==54 | ccode2==57 | ccode2==58 | ccode2==60 | ccode2==80 ////
| ccode2==110 | ccode2==115 | ccode2==212 | ccode2==260 | ccode2==316 | ccode2==317 | ccode2==331 | ////
 ccode2==338 | ccode2==343 | ccode2==344 | ccode2==346 | ccode2==349 | ccode2==352 | ccode2==359 | ccode2==366 | ////
 ccode2==367 | ccode2==368 | ccode2==369 | ccode2==370| ccode2==371 | ccode2==372 | //// 
ccode2== 373 | ccode2==395 | ccode2==531 |ccode2==701 | ccode2==702 | ccode2==703 | ccode2==704 | ccode2==705 | ccode2==760 | ccode2==781 | ////
ccode2== 835 | ccode2==910 | ccode2==935 |ccode2==940 | ccode2==946  | ccode2==990 | ccode2==365 | ccode2==987 | ccode2==970 | ccode2==955 | ccode2==950 ////
| ccode2==983 | ccode2==986 | ccode2==680 |  ccode2==490 | ccode2==522 | ccode2==565 | ccode2==571 | ccode2==591 | ccode2==694 | ccode2==712 | ccode2==713 | ////
ccode2==812 |ccode2==402 | ccode2==403 | ccode2==411 | ccode2==570 | ccode2==572 | ccode2==581 | ccode2==590 | ////
ccode2==692 | ccode2==698 | ccode2==830 | ccode2==482| ccode2==800
drop if year>1990

tsset ccode2 year

set more off
synth flow gdppc2 gdp2, trunit(345) trperiod(1973)  figure 

*End of Australia - Turkey

use "data_for_synth", clear
keep if ccode1==900
drop if ccode2==200 | ccode2==210 | ccode2==260 | ccode2==325 | ccode2==345 
drop if ccode2== 31 |ccode2==56 ////
| ccode2==56 | ccode2==53 |ccode2==54 | ccode2==57 | ccode2==58 | ccode2==60 | ccode2==80 ////
| ccode2==110 | ccode2==115 | ccode2==212 | ccode2==260 | ccode2==316 | ccode2==317 | ccode2==331 | ////
 ccode2==338 | ccode2==343 | ccode2==344 | ccode2==346 | ccode2==349 | ccode2==352 | ccode2==359 | ccode2==366 | ////
 ccode2==367 | ccode2==368 | ccode2==369 | ccode2==370| ccode2==371 | ccode2==372 | //// 
ccode2== 373 | ccode2==395 | ccode2==531 |ccode2==701 | ccode2==702 | ccode2==703 | ccode2==704 | ccode2==705 | ccode2==760 | ccode2==781 | ////
ccode2== 835 | ccode2==910 | ccode2==935 |ccode2==940 | ccode2==946  | ccode2==990 | ccode2==365 | ccode2==987 | ccode2==970 | ccode2==955 | ccode2==950 ////
| ccode2==983 | ccode2==986 | ccode2==680 |  ccode2==490 | ccode2==522 | ccode2==565 | ccode2==571 | ccode2==591 | ccode2==694 | ccode2==712 | ccode2==713 | ////
ccode2==812 |ccode2==402 | ccode2==403 | ccode2==411 | ccode2==570 | ccode2==572 | ccode2==581 | ccode2==590 | ////
ccode2==692 | ccode2==698 | ccode2==830 | ccode2==482| ccode2==800
drop if year>1990

tsset ccode2 year

set more off
synth flow gdppc2 gdp2, trunit(640) trperiod(1973)  figure 

*End of Australia - Netherlands

use "data_for_synth", clear
keep if ccode1==900
drop if ccode2==640 | ccode2==200 | ccode2==260 | ccode2==325 | ccode2==345 
drop if ccode2== 31 |ccode2==56 ////
| ccode2==56 | ccode2==53 |ccode2==54 | ccode2==57 | ccode2==58 | ccode2==60 | ccode2==80 ////
| ccode2==110 | ccode2==115 | ccode2==212 | ccode2==260 | ccode2==316 | ccode2==317 | ccode2==331 | ////
 ccode2==338 | ccode2==343 | ccode2==344 | ccode2==346 | ccode2==349 | ccode2==352 | ccode2==359 | ccode2==366 | ////
 ccode2==367 | ccode2==368 | ccode2==369 | ccode2==370| ccode2==371 | ccode2==372 | //// 
ccode2== 373 | ccode2==395 | ccode2==531 |ccode2==701 | ccode2==702 | ccode2==703 | ccode2==704 | ccode2==705 | ccode2==760 | ccode2==781 | ////
ccode2== 835 | ccode2==910 | ccode2==935 |ccode2==940 | ccode2==946  | ccode2==990 | ccode2==365 | ccode2==987 | ccode2==970 | ccode2==955 | ccode2==950 ////
| ccode2==983 | ccode2==986 | ccode2==680 |  ccode2==490 | ccode2==522 | ccode2==565 | ccode2==571 | ccode2==591 | ccode2==694 | ccode2==712 | ccode2==713 | ////
ccode2==812 |ccode2==402 | ccode2==403 | ccode2==411 | ccode2==570 | ccode2==572 | ccode2==581 | ccode2==590 | ////
ccode2==692 | ccode2==698 | ccode2==830 | ccode2==482| ccode2==800
drop if year>1990

tsset ccode2 year

set more off
synth flow gdppc2 gdp2, trunit(210) trperiod(1973)  figure 

*End of Australia - Germany

use "data_for_synth", clear
keep if ccode1==900
drop if ccode2==640 | ccode2==200 | ccode2==210 | ccode2==325 | ccode2==345 
drop if ccode2== 31 |ccode2==56 ////
| ccode2==56 | ccode2==53 |ccode2==54 | ccode2==57 | ccode2==58 | ccode2==60 | ccode2==80 ////
| ccode2==110 | ccode2==115 | ccode2==212 | ccode2==260 | ccode2==316 | ccode2==317 | ccode2==331 | ////
 ccode2==338 | ccode2==343 | ccode2==344 | ccode2==346 | ccode2==349 | ccode2==352 | ccode2==359 | ccode2==366 | ////
 ccode2==367 | ccode2==368 | ccode2==369 | ccode2==370| ccode2==371 | ccode2==372 | //// 
ccode2== 373 | ccode2==395 | ccode2==531 |ccode2==701 | ccode2==702 | ccode2==703 | ccode2==704 | ccode2==705 | ccode2==760 | ccode2==781 | ////
ccode2== 835 | ccode2==910 | ccode2==935 |ccode2==940 | ccode2==946  | ccode2==990 | ccode2==365 | ccode2==987 | ccode2==970 | ccode2==955 | ccode2==950 ////
| ccode2==983 | ccode2==986 | ccode2==680 |  ccode2==490 | ccode2==522 | ccode2==565 | ccode2==571 | ccode2==591 | ccode2==694 | ccode2==712 | ccode2==713 | ////
ccode2==812 |ccode2==402 | ccode2==403 | ccode2==411 | ccode2==570 | ccode2==572 | ccode2==581 | ccode2==590 | ////
ccode2==692 | ccode2==698 | ccode2==830 | ccode2==482| ccode2==800
drop if year>1990

tsset ccode2 year

set more off
synth flow gdppc2 gdp2, trunit(255) trperiod(1973)  figure 

*End of Australia - Italy

use "data_for_synth", clear
keep if ccode1==900
drop if ccode2==640 | ccode2==200 | ccode2==210 | ccode2==255 | ccode2==345 
drop if ccode2== 31 |ccode2==56 ////
| ccode2==56 | ccode2==53 |ccode2==54 | ccode2==57 | ccode2==58 | ccode2==60 | ccode2==80 ////
| ccode2==110 | ccode2==115 | ccode2==212 | ccode2==260 | ccode2==316 | ccode2==317 | ccode2==331 | ////
 ccode2==338 | ccode2==343 | ccode2==344 | ccode2==346 | ccode2==349 | ccode2==352 | ccode2==359 | ccode2==366 | ////
 ccode2==367 | ccode2==368 | ccode2==369 | ccode2==370| ccode2==371 | ccode2==372 | //// 
ccode2== 373 | ccode2==395 | ccode2==531 |ccode2==701 | ccode2==702 | ccode2==703 | ccode2==704 | ccode2==705 | ccode2==760 | ccode2==781 | ////
ccode2== 835 | ccode2==910 | ccode2==935 |ccode2==940 | ccode2==946  | ccode2==990 | ccode2==365 | ccode2==987 | ccode2==970 | ccode2==955 | ccode2==950 ////
| ccode2==983 | ccode2==986 | ccode2==680 |  ccode2==490 | ccode2==522 | ccode2==565 | ccode2==571 | ccode2==591 | ccode2==694 | ccode2==712 | ccode2==713 | ////
ccode2==812 |ccode2==402 | ccode2==403 | ccode2==411 | ccode2==570 | ccode2==572 | ccode2==581 | ccode2==590 | ////
ccode2==692 | ccode2==698 | ccode2==830 | ccode2==482| ccode2==800
drop if year>1990

tsset ccode2 year

set more off
synth flow gdppc2 gdp2, trunit(325) trperiod(1973)  figure 

